(features)
| 347 | |
| 348 | |
| 349 | def _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"]) |
no test coverage detected