@@ -66,13 +66,14 @@ Try it interactively in a
66
66
67
67
### ` DatasetBuilder `
68
68
69
- All datasets are implemented as subclasses of
70
- [ ` DatasetBuilder ` ] ( https://www.tensorflow.org/datasets/api_docs/python/tfds/core/DatasetBuilder.md )
71
- and
72
- [ ` tfds.load ` ] ( https://www.tensorflow.org/datasets/api_docs/python/tfds/load.md )
73
- is a thin convenience wrapper.
74
- [ ` DatasetInfo ` ] ( https://www.tensorflow.org/datasets/api_docs/python/tfds/core/DatasetInfo.md )
75
- documents the dataset.
69
+ All datasets are implemented as subclasses of ` tfds.core.DatasetBuilder ` . TFDS
70
+ has two entry points:
71
+
72
+ * ` tfds.builder ` : Returns the ` tfds.core.DatasetBuilder ` instance, giving
73
+ control over ` builder.download_and_prepate() ` and
74
+ ` builder.as_dataset() ` .
75
+ * ` tfds.load ` : Convenience wrapper which hides the ` download_and_prepate ` and
76
+ ` as_dataset ` calls, and directly returns the ` tf.data.Dataset ` .
76
77
77
78
``` python
78
79
import tensorflow_datasets as tfds
@@ -138,9 +139,7 @@ info.features['label'].str2int('cat') # 0
138
139
### NumPy Usage with ` tfds.as_numpy `
139
140
140
141
As a convenience for users that want simple NumPy arrays in their programs, you
141
- can use
142
- [ ` tfds.as_numpy ` ] ( https://www.tensorflow.org/datasets/api_docs/python/tfds/as_numpy.md )
143
- to return a generator that yields NumPy array
142
+ can use ` tfds.as_numpy ` to return a generator that yields NumPy array
144
143
records out of a ` tf.data.Dataset ` . This allows you to build high-performance
145
144
input pipelines with ` tf.data ` but use whatever you'd like for your model
146
145
components.
0 commit comments