<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/processor/proto/classifications.proto) |

List of predicted classes (aka labels) for a given classifier head.

    tflite_support.task.processor.Classifications(
        categories: List[https://developers.google.com/edge/api/tflite/python/tflite_support/task/processor/Category],
        head_index: int,
        head_name: str
    )

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `categories` | The array of predicted categories, usually sorted by descending scores (e.g. from high to low probability). |
| `head_index` | The index of the classifier head these categories refer to. This is useful for multi-head models. |
| `head_name` | The name of the classifier head, which is the corresponding tensor metadata. |

<br />

## Methods

### `create_from_pb2`

[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/classifications.proto)

    @classmethod
    create_from_pb2(
        pb2_obj: _ClassificationsProto
    ) -> 'Classifications'

Creates a `Classifications` 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/processor/proto/classifications.proto)

    to_pb2() -> _ClassificationsProto

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/processor/proto/classifications.proto)

    __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 />