TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.data.experimental.get_structure

TensorFlow 1 version View source on GitHub

Returns the type specification of an element of a Dataset or Iterator.

Aliases:

tf.data.experimental.get_structure(dataset_or_iterator)

Args:

Returns:

A nested structure of tf.TypeSpec objects matching the structure of an element of dataset_or_iterator and spacifying the type of individal components.

Raises:

  • TypeError: If dataset_or_iterator is not a Dataset or Iterator object.