MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / get_legacy_output_shapes

Function get_legacy_output_shapes

tensorflow/python/data/ops/dataset_ops.py:2257–2273  ·  view source on GitHub ↗

Returns the output shapes of a `Dataset` or `Iterator` elements. This utility method replaces the deprecated-in-V2 `tf.compat.v1.Dataset.output_shapes` property. Args: dataset_or_iterator: A `tf.data.Dataset` or `tf.data.Iterator`. Returns: A nested structure of `tf.TensorShape` o

(dataset_or_iterator)

Source from the content-addressed store, hash-verified

2255
2256@tf_export(v1=["data.get_output_shapes"])
2257def get_legacy_output_shapes(dataset_or_iterator):
2258 """Returns the output shapes of a `Dataset` or `Iterator` elements.
2259
2260 This utility method replaces the deprecated-in-V2
2261 `tf.compat.v1.Dataset.output_shapes` property.
2262
2263 Args:
2264 dataset_or_iterator: A `tf.data.Dataset` or `tf.data.Iterator`.
2265
2266 Returns:
2267 A nested structure of `tf.TensorShape` objects matching the structure of
2268 the dataset / iterator elements and specifying the shape of the individual
2269 components.
2270 """
2271 return nest.map_structure(
2272 lambda component_spec: component_spec._to_legacy_output_shapes(), # pylint: disable=protected-access
2273 get_structure(dataset_or_iterator))
2274
2275
2276@tf_export(v1=["data.get_output_types"])

Callers 6

__repr__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls 2

get_structureFunction · 0.85

Tested by

no test coverage detected