Skip to content

Commit 8e356db

Browse files
tomvdwThe TensorFlow Datasets Authors
authored andcommitted
correct instructions how to examine feature serialization
PiperOrigin-RevId: 425357718
1 parent a2e93aa commit 8e356db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/external_tfrecord.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ Similarly, a `feature.deserialize_example` exists to decode the proto
8181

8282
#### If you don't control the generation pipeline
8383

84-
If you're not sure what your `tfds.features` translates into `tf.train.Example`,
85-
you can experiment in colab:
84+
If you want to see how `tfds.features` are represented in a `tf.train.Example`,
85+
you can examine this in colab:
8686

8787
* To translate `tfds.features` into the human readable structure of the
8888
`tf.train.Example`, you can call `features.get_serialized_info()`.
@@ -92,7 +92,7 @@ you can experiment in colab:
9292
```python
9393
example_specs = features.get_serialized_info()
9494
parser = tfds.core.example_parser.ExampleParser(example_specs)
95-
nested_feature_specs = parser._build_feature_specs()
95+
nested_feature_specs = parser._nested_feature_specs
9696
feature_specs = tfds.core.utils.flatten_nest_dict(nested_feature_specs)
9797
```
9898

@@ -103,7 +103,7 @@ Note: If you're using custom feature connector, make sure to implement
103103
### Get statistics on splits
104104

105105

106-
TFDS requires to know the exact number of example within each shard. This is
106+
TFDS requires to know the exact number of examples within each shard. This is
107107
required for features like `len(ds)`, or the
108108
[subplit API](https://www.tensorflow.org/datasets/splits):
109109
`split='train[75%:]'`.

0 commit comments

Comments
 (0)