# tf.compat.v1.data.get_output_classes

<br />

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

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

    tf.compat.v1.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/r2.1/api_docs/python/tf/data/Dataset) or [`tf.data.Iterator`](https://www.tensorflow.org/api_docs/python/tf/data/Iterator). |

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