<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/core/base_options.py#L25-L84) |

Base options for TensorFlow Lite Task Library's Python APIs.

    tflite_support.task.core.BaseOptions(
        file_name: Optional[str] = None,
        file_content: Optional[bytes] = None,
        num_threads: Optional[int] = -1,
        use_coral: Optional[bool] = None
    )

Represents external files used by the Task APIs (e.g. TF Lite FlatBuffer or
plain-text labels file). The files can be specified by one of the following
two ways:

(1) file contents loaded in `file_content`.
(2) file path in `file_name`.

If more than one field of these fields is provided, they are used in this
precedence order.

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `file_name` | Path to the index. |
| `file_content` | The index file contents as bytes. |
| `num_threads` | Number of thread, the default value is -1 which means Interpreter will decide what is the most appropriate `num_threads`. |
| `use_coral` | If true, inference will be delegated to a connected Coral Edge TPU device. |

<br />

## Methods

### `create_from_pb2`

[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/core/base_options.py#L62-L70)

    @classmethod
    create_from_pb2(
        pb2_obj: _BaseOptionsProto
    ) -> 'BaseOptions'

Creates a `BaseOptions` object from the given protobuf object.

### `to_pb2`

[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/core/base_options.py#L53-L60)

    to_pb2() -> _BaseOptionsProto

Generates a protobuf object to pass to the C++ layer.

### `__eq__`

[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/core/base_options.py#L72-L84)

    __eq__(
        other: Any
    ) -> bool

Checks if this object is equal to the given object.

<br />

<br />

<br />

| Args ||
|---|---|
| `other` | The object to be compared with. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| True if the objects are equal. ||

<br />

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| file_content | `None` |
| file_name | `None` |
| num_threads | `-1` |
| use_coral | `None` |

<br />