View source on GitHub
|
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.
Methods
create_from_pb2
@classmethodcreate_from_pb2( pb2_obj: _BaseOptionsProto ) -> 'BaseOptions'
Creates a BaseOptions object from the given protobuf object.
to_pb2
to_pb2() -> _BaseOptionsProto
Generates a protobuf object to pass to the C++ layer.
__eq__
__eq__(
other: Any
) -> bool
Checks if this object is equal to the given object.
| Args | |
|---|---|
other
|
The object to be compared with. |
| Returns | |
|---|---|
| True if the objects are equal. |
Class Variables | |
|---|---|
| file_content |
None
|
| file_name |
None
|
| num_threads |
-1
|
| use_coral |
None
|
View source on GitHub