From 5d6adc910b8323b73a61d3089f3a3028be411e90 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 9 Oct 2018 09:33:59 -0700 Subject: Improve docstring for tf.data.Dataset.shuffle() PiperOrigin-RevId: 216370329 --- tensorflow/python/data/ops/dataset_ops.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tensorflow') 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 -- cgit v1.2.3