aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tensorflow/python/data/ops/dataset_ops.py5
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