# tf.estimator.export.ClassificationOutput

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/saved_model/model_utils/export_output.py#L98-L174) |

Represents the output of a classification head. (deprecated)

Inherits From: [`ExportOutput`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/estimator/export/ExportOutput)

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

\`tf.compat.v1.estimator.export.ClassificationOutput\`

<br />

    tf.estimator.export.ClassificationOutput(
        scores=None, classes=None
    )

> [!WARNING]
> **Deprecated:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.keras instead.

Either classes or scores or both must be set.

The classes `Tensor` must provide string labels, not integer class IDs.

If only classes is set, it is interpreted as providing top-k results in
descending order.

If only scores is set, it is interpreted as providing a score for every class
in order of class ID.

If both classes and scores are set, they are interpreted as zipped, so each
score corresponds to the class at the same index. Clients should not depend
on the order of the entries.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `scores` | A float `Tensor` giving scores (sometimes but not always interpretable as probabilities) for each class. May be `None`, but only if `classes` is set. Interpretation varies-- see class doc. |
| `classes` | A string `Tensor` giving predicted class labels. May be `None`, but only if `scores` is set. Interpretation varies-- see class doc. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if neither classes nor scores is set, or one of them is not a `Tensor` with the correct dtype. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `classes` | <br /> <br /> |
| `scores` | <br /> <br /> |

<br />

## Methods

### `as_signature_def`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/saved_model/model_utils/export_output.py#L155-L174)

    as_signature_def(
        receiver_tensors
    )

Generate a SignatureDef proto for inclusion in a MetaGraphDef.

The SignatureDef will specify outputs as described in this ExportOutput,
and will use the provided receiver_tensors as inputs.

<br />

<br />

<br />

| Args ||
|---|---|
| `receiver_tensors` | a `Tensor`, or a dict of string to `Tensor`, specifying input nodes that will be fed. |

<br />