diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-10-09 09:33:59 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-09 09:48:45 -0700 |
commit | 5d6adc910b8323b73a61d3089f3a3028be411e90 (patch) | |
tree | 791b2ae2d3b0bcad36037ca653ad303067d79ee0 | |
parent | 3e1a0792fb593953860162d57320c8602fd199eb (diff) |
Improve docstring for tf.data.Dataset.shuffle()
PiperOrigin-RevId: 216370329
-rw-r--r-- | tensorflow/python/data/ops/dataset_ops.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/python/data/ops/dataset_ops.py b/tensorflow/python/data/ops/dataset_ops.py index b7e19055f2..cf52f7529a 100644 --- a/tensorflow/python/data/ops/dataset_ops.py +++ b/tensorflow/python/data/ops/dataset_ops.py @@ -733,6 +733,11 @@ class Dataset(object): def shuffle(self, buffer_size, seed=None, reshuffle_each_iteration=None): """Randomly shuffles the elements of this dataset. + This dataset fills a buffer with `buffer_size` elements, then randomly + samples elements from this buffer, replacing the selected elements with new + elements. For perfect shuffling, a buffer size greater than or equal to the + full size of the dataset is required. + Args: buffer_size: A `tf.int64` scalar `tf.Tensor`, representing the number of elements from this dataset from which the new |