# TensorFlowLite

```
class TensorFlowLite
```

*** ** * ** ***

Static utility methods for loading the TensorFlowLite runtime.

## Summary

| ### Public functions |
|---|---|
| `java-static https://developers.google.com/edge/api/litert/kotlin/kotlin/Unit` | `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#init()()` Ensure the TensorFlowLite native library has been loaded. |
| `java-static https://developers.google.com/edge/api/litert/kotlin/kotlin/String!` | `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#runtimeVersion()()` Returns the version of the default TensorFlowLite runtime. |
| `java-static https://developers.google.com/edge/api/litert/kotlin/kotlin/String!` | `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#runtimeVersion(org.tensorflow.lite.InterpreterApi.Options.TfLiteRuntime)(runtime: https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/InterpreterApi.Options.TfLiteRuntime!)` Returns the version of the specified TensorFlowLite runtime. |
| `java-static https://developers.google.com/edge/api/litert/kotlin/kotlin/String!` | `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#schemaVersion()()` Returns the version of the TensorFlowLite model schema that is supported by the default TensorFlowLite runtime. |
| `java-static https://developers.google.com/edge/api/litert/kotlin/kotlin/String!` | `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#schemaVersion(org.tensorflow.lite.InterpreterApi.Options.TfLiteRuntime)(runtime: https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/InterpreterApi.Options.TfLiteRuntime!)` Returns the version of the TensorFlowLite model schema that is supported by the specified TensorFlowLite runtime. |
| `java-static https://developers.google.com/edge/api/litert/kotlin/kotlin/String!` | `[version](https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#version())()` **This function is deprecated.** Prefer using `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#runtimeVersion()` or `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#schemaVersion()`. |

## Public functions

### init

```
java-static fun init(): Unit
```

Ensure the TensorFlowLite native library has been loaded.

If unsuccessful, throws an UnsatisfiedLinkError with the appropriate error message.

### runtimeVersion

```
java-static fun runtimeVersion(): String!
```

Returns the version of the default TensorFlowLite runtime.

### runtimeVersion

```
java-static fun runtimeVersion(runtime: InterpreterApi.Options.TfLiteRuntime!): String!
```

Returns the version of the specified TensorFlowLite runtime.

### schemaVersion

```
java-static fun schemaVersion(): String!
```

Returns the version of the TensorFlowLite model schema that is supported by the default TensorFlowLite runtime.

### schemaVersion

```
java-static fun schemaVersion(runtime: InterpreterApi.Options.TfLiteRuntime!): String!
```

Returns the version of the TensorFlowLite model schema that is supported by the specified TensorFlowLite runtime.

### version

```
java-static fun [version](https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#version())(): String!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Prefer using `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#runtimeVersion()` or `https://developers.google.com/edge/api/litert/kotlin/org/tensorflow/lite/TensorFlowLite#schemaVersion()`.

Returns the version of the underlying TensorFlowLite model schema.