Skip to content

Commit 389eeb6

Browse files
Conchylicultorcopybara-github
authored andcommitted
Update doc
PiperOrigin-RevId: 252698370
1 parent cae2527 commit 389eeb6

File tree

7 files changed

+294
-131
lines changed

7 files changed

+294
-131
lines changed

docs/api_docs/python/tfds/core/BeamBasedBuilder.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Callers must pass arguments as keyword arguments.
7878
```python
7979
as_dataset(
8080
split=None,
81-
batch_size=1,
81+
batch_size=None,
8282
shuffle_files=None,
8383
as_supervised=False
8484
)
@@ -95,10 +95,10 @@ Callers must pass arguments as keyword arguments.
9595
which subset(s) of the data to read. If None (default), returns all splits
9696
in a dict `<key: tfds.Split, value: tf.data.Dataset>`.
9797
* <b>`batch_size`</b>: `int`, batch size. Note that variable-length features
98-
will be 0-padded if `batch_size > 1`. Users that want more custom behavior
99-
should use `batch_size=1` and use the `tf.data` API to construct a custom
100-
pipeline. If `batch_size == -1`, will return feature dictionaries of the
101-
whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
98+
will be 0-padded if `batch_size` is set. Users that want more custom
99+
behavior should use `batch_size=None` and use the `tf.data` API to construct
100+
a custom pipeline. If `batch_size == -1`, will return feature dictionaries
101+
of the whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
102102
* <b>`shuffle_files`</b>: `bool`, whether to shuffle the input files. Defaults
103103
to `True` if `split == tfds.Split.TRAIN` and `False` otherwise.
104104
* <b>`as_supervised`</b>: `bool`, if `True`, the returned `tf.data.Dataset`

docs/api_docs/python/tfds/core/DatasetBuilder.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Callers must pass arguments as keyword arguments.
109109
```python
110110
as_dataset(
111111
split=None,
112-
batch_size=1,
112+
batch_size=None,
113113
shuffle_files=None,
114114
as_supervised=False
115115
)
@@ -126,10 +126,10 @@ Callers must pass arguments as keyword arguments.
126126
which subset(s) of the data to read. If None (default), returns all splits
127127
in a dict `<key: tfds.Split, value: tf.data.Dataset>`.
128128
* <b>`batch_size`</b>: `int`, batch size. Note that variable-length features
129-
will be 0-padded if `batch_size > 1`. Users that want more custom behavior
130-
should use `batch_size=1` and use the `tf.data` API to construct a custom
131-
pipeline. If `batch_size == -1`, will return feature dictionaries of the
132-
whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
129+
will be 0-padded if `batch_size` is set. Users that want more custom
130+
behavior should use `batch_size=None` and use the `tf.data` API to construct
131+
a custom pipeline. If `batch_size == -1`, will return feature dictionaries
132+
of the whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
133133
* <b>`shuffle_files`</b>: `bool`, whether to shuffle the input files. Defaults
134134
to `True` if `split == tfds.Split.TRAIN` and `False` otherwise.
135135
* <b>`as_supervised`</b>: `bool`, if `True`, the returned `tf.data.Dataset`

docs/api_docs/python/tfds/core/GeneratorBasedBuilder.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Callers must pass arguments as keyword arguments.
8787
```python
8888
as_dataset(
8989
split=None,
90-
batch_size=1,
90+
batch_size=None,
9191
shuffle_files=None,
9292
as_supervised=False
9393
)
@@ -104,10 +104,10 @@ Callers must pass arguments as keyword arguments.
104104
which subset(s) of the data to read. If None (default), returns all splits
105105
in a dict `<key: tfds.Split, value: tf.data.Dataset>`.
106106
* <b>`batch_size`</b>: `int`, batch size. Note that variable-length features
107-
will be 0-padded if `batch_size > 1`. Users that want more custom behavior
108-
should use `batch_size=1` and use the `tf.data` API to construct a custom
109-
pipeline. If `batch_size == -1`, will return feature dictionaries of the
110-
whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
107+
will be 0-padded if `batch_size` is set. Users that want more custom
108+
behavior should use `batch_size=None` and use the `tf.data` API to construct
109+
a custom pipeline. If `batch_size == -1`, will return feature dictionaries
110+
of the whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
111111
* <b>`shuffle_files`</b>: `bool`, whether to shuffle the input files. Defaults
112112
to `True` if `split == tfds.Split.TRAIN` and `False` otherwise.
113113
* <b>`as_supervised`</b>: `bool`, if `True`, the returned `tf.data.Dataset`

docs/api_docs/python/tfds/load.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tfds.load(
1212
name,
1313
split=None,
1414
data_dir=None,
15-
batch_size=1,
15+
batch_size=None,
1616
download=True,
1717
as_supervised=False,
1818
with_info=False,
@@ -71,9 +71,9 @@ of hundreds of GiB to disk. Refer to the `download` argument.
7171
<a href="../tfds/Split.md#TEST"><code>tfds.Split.TEST</code></a>).
7272
* <b>`data_dir`</b>: `str` (optional), directory to read/write data. Defaults
7373
datasets are stored.
74-
* <b>`batch_size`</b>: `int`, set to > 1 to get batches of examples. Note that
75-
variable length features will be 0-padded. If `batch_size=-1`, will return
76-
the full dataset as `tf.Tensor`s.
74+
* <b>`batch_size`</b>: `int`, if set, add a batch dimension to examples. Note
75+
that variable length features will be 0-padded. If `batch_size=-1`, will
76+
return the full dataset as `tf.Tensor`s.
7777
* <b>`download`</b>: `bool` (optional), whether to call
7878
<a href="../tfds/core/DatasetBuilder.md#download_and_prepare"><code>tfds.core.DatasetBuilder.download_and_prepare</code></a>
7979
before calling `tf.DatasetBuilder.as_dataset`. If `False`, data is expected

docs/api_docs/python/tfds/testing/DummyDatasetSharedGenerator.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Callers must pass arguments as keyword arguments.
8282
```python
8383
as_dataset(
8484
split=None,
85-
batch_size=1,
85+
batch_size=None,
8686
shuffle_files=None,
8787
as_supervised=False
8888
)
@@ -99,10 +99,10 @@ Callers must pass arguments as keyword arguments.
9999
which subset(s) of the data to read. If None (default), returns all splits
100100
in a dict `<key: tfds.Split, value: tf.data.Dataset>`.
101101
* <b>`batch_size`</b>: `int`, batch size. Note that variable-length features
102-
will be 0-padded if `batch_size > 1`. Users that want more custom behavior
103-
should use `batch_size=1` and use the `tf.data` API to construct a custom
104-
pipeline. If `batch_size == -1`, will return feature dictionaries of the
105-
whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
102+
will be 0-padded if `batch_size` is set. Users that want more custom
103+
behavior should use `batch_size=None` and use the `tf.data` API to construct
104+
a custom pipeline. If `batch_size == -1`, will return feature dictionaries
105+
of the whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
106106
* <b>`shuffle_files`</b>: `bool`, whether to shuffle the input files. Defaults
107107
to `True` if `split == tfds.Split.TRAIN` and `False` otherwise.
108108
* <b>`as_supervised`</b>: `bool`, if `True`, the returned `tf.data.Dataset`

docs/api_docs/python/tfds/testing/DummyMnist.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ __init__(
6262
```python
6363
as_dataset(
6464
split=None,
65-
batch_size=1,
65+
batch_size=None,
6666
shuffle_files=None,
6767
as_supervised=False
6868
)
@@ -79,10 +79,10 @@ Callers must pass arguments as keyword arguments.
7979
which subset(s) of the data to read. If None (default), returns all splits
8080
in a dict `<key: tfds.Split, value: tf.data.Dataset>`.
8181
* <b>`batch_size`</b>: `int`, batch size. Note that variable-length features
82-
will be 0-padded if `batch_size > 1`. Users that want more custom behavior
83-
should use `batch_size=1` and use the `tf.data` API to construct a custom
84-
pipeline. If `batch_size == -1`, will return feature dictionaries of the
85-
whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
82+
will be 0-padded if `batch_size` is set. Users that want more custom
83+
behavior should use `batch_size=None` and use the `tf.data` API to construct
84+
a custom pipeline. If `batch_size == -1`, will return feature dictionaries
85+
of the whole dataset with `tf.Tensor`s instead of a `tf.data.Dataset`.
8686
* <b>`shuffle_files`</b>: `bool`, whether to shuffle the input files. Defaults
8787
to `True` if `split == tfds.Split.TRAIN` and `False` otherwise.
8888
* <b>`as_supervised`</b>: `bool`, if `True`, the returned `tf.data.Dataset`

0 commit comments

Comments
 (0)