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

Function get_legacy_output_classes

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

Returns the output classes of a `Dataset` or `Iterator` elements. This utility method replaces the deprecated-in-V2 `tf.compat.v1.Dataset.output_classes` property. Args: dataset_or_iterator: A `tf.data.Dataset` or `tf.data.IteratorV2`. Returns: A nested structure of Python `type`

(dataset_or_iterator)

Source from the content-addressed store, hash-verified

2235
2236@tf_export(v1=["data.get_output_classes"])
2237def get_legacy_output_classes(dataset_or_iterator):
2238 """Returns the output classes of a `Dataset` or `Iterator` elements.
2239
2240 This utility method replaces the deprecated-in-V2
2241 `tf.compat.v1.Dataset.output_classes` property.
2242
2243 Args:
2244 dataset_or_iterator: A `tf.data.Dataset` or `tf.data.IteratorV2`.
2245
2246 Returns:
2247 A nested structure of Python `type` objects matching the structure of the
2248 dataset / iterator elements and specifying the class of the individual
2249 components.
2250 """
2251 return nest.map_structure(
2252 lambda component_spec: component_spec._to_legacy_output_classes(), # pylint: disable=protected-access
2253 get_structure(dataset_or_iterator))
2254
2255
2256@tf_export(v1=["data.get_output_shapes"])

Callers 5

__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls 2

get_structureFunction · 0.85

Tested by

no test coverage detected