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

Function _prepend_none_dimension

tensorflow/python/ops/parsing_ops.py:349–364  ·  view source on GitHub ↗
(features)

Source from the content-addressed store, hash-verified

347
348
349def _prepend_none_dimension(features):
350 if features:
351 modified_features = dict(features) # Create a copy to modify
352 for key, feature in features.items():
353 if isinstance(feature, FixedLenSequenceFeature):
354 if not feature.allow_missing:
355 raise ValueError("Unsupported: FixedLenSequenceFeature requires "
356 "allow_missing to be True.")
357 modified_features[key] = FixedLenSequenceFeature(
358 [None] + list(feature.shape),
359 feature.dtype,
360 feature.allow_missing,
361 feature.default_value)
362 return modified_features
363 else:
364 return features
365
366
367@tf_export(v1=["io.parse_example", "parse_example"])

Callers 3

parse_example_v2Function · 0.85
parse_single_example_v2Function · 0.85

Calls 1

Tested by

no test coverage detected