This is a legacy API for inspecting the type signature of dataset elements. In
TF 2, you should use the tf.data.Dataset.element_spec attribute instead.
A (nested) structure of tf.TensorShape objects matching the structure of
the dataset / iterator elements and specifying the shape of the individual
components.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.compat.v1.data.get_output_shapes\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/data/ops/dataset_ops.py#L4402-L4421) |\n\nReturns the output shapes for elements of the input dataset / iterator. \n\n tf.compat.v1.data.get_output_shapes(\n dataset_or_iterator\n )\n\n\u003cbr /\u003e\n\nMigrate to TF2\n--------------\n\n\u003cbr /\u003e\n\n| **Caution:** This API was designed for TensorFlow v1. Continue reading for details on how to migrate from this API to a native TensorFlow v2 equivalent. See the [TensorFlow v1 to TensorFlow v2 migration guide](https://www.tensorflow.org/guide/migrate) for instructions on how to migrate the rest of your code.\n\nThis is a legacy API for inspecting the type signature of dataset elements. In\nTF 2, you should use the [`tf.data.Dataset.element_spec`](../../../../tf/data/Dataset#element_spec) attribute instead.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nDescription\n-----------\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------------------|-----------------------------------------------------------------------------------------------------------|\n| `dataset_or_iterator` | A [`tf.data.Dataset`](../../../../tf/data/Dataset) or [`tf.data.Iterator`](../../../../tf/data/Iterator). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A (nested) structure of [`tf.TensorShape`](../../../../tf/TensorShape) objects matching the structure of the dataset / iterator elements and specifying the shape of the individual components. ||\n\n\u003cbr /\u003e"]]