# tf.data.get_output_classes

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/data/ops/dataset_ops.py#L2140-L2157) |

Returns the output classes of a `Dataset` or `Iterator` elements.

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.data.get_output_classes`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/data/get_output_classes)

<br />

    tf.data.get_output_classes(
        dataset_or_iterator
    )

This utility method replaces the deprecated-in-V2
`tf.compat.v1.Dataset.output_classes` property.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `dataset_or_iterator` | A [`tf.data.Dataset`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/data/Dataset) or `tf.data.IteratorV2`. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A nested structure of Python `type` objects matching the structure of the dataset / iterator elements and specifying the class of the individual components. ||

<br />