From 602b1c3f37c1ab2969299d4fbb93a09e1ba3f612 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 22 Aug 2019 04:01:46 -0700 Subject: [PATCH] Update `tfds.load()` callers to specify `shuffle_files=True` when necessary. PiperOrigin-RevId: 264803647 --- tutorials/lm_dpsgd_tutorial.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tutorials/lm_dpsgd_tutorial.py b/tutorials/lm_dpsgd_tutorial.py index 8bc1cff..67398ea 100644 --- a/tutorials/lm_dpsgd_tutorial.py +++ b/tutorials/lm_dpsgd_tutorial.py @@ -134,7 +134,8 @@ def load_data(): 'using a substitute dataset from the tensorflow_datasets module.') train_dataset = tfds.load(name='lm1b/subwords8k', split=tfds.Split.TRAIN, - batch_size=NB_TRAIN) + batch_size=NB_TRAIN, + shuffle_files=True) test_dataset = tfds.load(name='lm1b/subwords8k', split=tfds.Split.TEST, batch_size=10000)