View source on GitHub |
A container for common tensor metadata information.
tflite_support.metadata_writers.metadata_info.TensorMd(
name: Optional[str] = None,
description: Optional[str] = None,
min_values: Optional[List[float]] = None,
max_values: Optional[List[float]] = None,
content_type: tflite_support.metadata_schema_py_generated.ContentProperties
= _metadata_fb.ContentProperties.FeatureProperties,
associated_files: Optional[List[Type[AssociatedFileMd]]] = None,
tensor_name: Optional[str] = None
)
Attributes | |
---|---|
name
|
name of the tensor. |
description
|
description of what the tensor is. |
min_values
|
per-channel minimum value of the tensor. |
max_values
|
per-channel maximum value of the tensor. |
content_type
|
content_type of the tensor. |
associated_files
|
information of the associated files in the tensor. |
tensor_name
|
name of the corresponding tensor 1 in the TFLite model. It is used to locate the corresponding tensor and decide the order of the tensor metadata 2 when populating model metadata. |
Methods
create_metadata
create_metadata() -> tflite_support.metadata_schema_py_generated.TensorMetadataT
Creates the input tensor metadata based on the information.
Returns | |
---|---|
A Flatbuffers Python object of the input metadata. |