<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/metadata/python/metadata_writers/metadata_info.py#L597-L674) |

A container for the classification tensor metadata information.

Inherits From: [`TensorMd`](https://developers.google.com/edge/api/tflite/python/tflite_support/metadata_writers/metadata_info/TensorMd)

#### View aliases


**Main aliases**

[`tflite_support.metadata_writers.audio_classifier.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.audio_classifier.metadata_writer.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.bert_nl_classifier.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.bert_nl_classifier.metadata_writer.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.image_classifier.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.image_classifier.metadata_writer.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.image_segmenter.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.image_segmenter.metadata_writer.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.nl_classifier.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.nl_classifier.metadata_writer.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.object_detector.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd), [`tflite_support.metadata_writers.object_detector.metadata_writer.metadata_info.ClassificationTensorMd`](https://www.tensorflow.org/lite/api_docs/python/tflite_support/metadata_writers/metadata_info/ClassificationTensorMd)

<br />

    tflite_support.metadata_writers.metadata_info.ClassificationTensorMd(
        name: Optional[str] = None,
        description: Optional[str] = None,
        label_files: Optional[List[LabelFileMd]] = None,
        tensor_type: Optional[_schema_fb.TensorType] = None,
        score_calibration_md: Optional[https://developers.google.com/edge/api/tflite/python/tflite_support/metadata_writers/metadata_info/ScoreCalibrationMd] = None,
        tensor_name: Optional[str] = None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `name` | name of the tensor. |
| `description` | description of what the tensor is. |
| `label_files` | information of the label files [1](https://github.com/tensorflow/tflite-support/blob/b80289c4cd1224d0e1836c7654e82f070f9eefaa/tensorflow_lite_support/metadata/metadata_schema.fbs#L95) in the classification tensor. |
| `tensor_type` | data type of the tensor. |
| `score_calibration_md` | information of the score calibration files operation [2](https://github.com/tensorflow/tflite-support/blob/5e0cdf5460788c481f5cd18aab8728ec36cf9733/tensorflow_lite_support/metadata/metadata_schema.fbs#L434) in the classification tensor. |
| `tensor_name` | name of the corresponding tensor [3](https://github.com/tensorflow/tensorflow/blob/cb67fef35567298b40ac166b0581cd8ad68e5a3a/tensorflow/lite/schema/schema.fbs#L1129-L1136) in the TFLite model. It is used to locate the corresponding classification tensor and decide the order of the tensor metadata [4](https://github.com/tensorflow/tflite-support/blob/b2a509716a2d71dfff706468680a729cc1604cff/tensorflow_lite_support/metadata/metadata_schema.fbs#L595-L612) when populating model metadata. <br /> <br /> |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `label_files` | information of the label files [1](https://github.com/tensorflow/tflite-support/blob/b80289c4cd1224d0e1836c7654e82f070f9eefaa/tensorflow_lite_support/metadata/metadata_schema.fbs#L95) in the classification tensor. |
| `score_calibration_md` | information of the score calibration operation [2](https://github.com/tensorflow/tflite-support/blob/5e0cdf5460788c481f5cd18aab8728ec36cf9733/tensorflow_lite_support/metadata/metadata_schema.fbs#L434) in the classification tensor. <br /> <br /> |

<br />

## Methods

### `create_metadata`

[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/metadata/python/metadata_writers/metadata_info.py#L667-L674)

    create_metadata() -> https://developers.google.com/edge/api/tflite/python/tflite_support/metadata_schema_py_generated/TensorMetadataT

Creates the classification tensor metadata based on the information.