aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/distribute/python/values.py
diff options
context:
space:
mode:
authorGravatar Priya Gupta <priyag@google.com>2018-06-20 23:40:35 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-20 23:43:45 -0700
commit4e071b268b8707b388e11f618d847c1f80199063 (patch)
treeca9e16493d96948198ebbd630348f0377cf0e76a /tensorflow/contrib/distribute/python/values.py
parentf786d43494eafe5d4192e7c9f43385a2d1335595 (diff)
Update mnist eager example with mirrored strategy as some of the methods it was using are now deprecated.
PiperOrigin-RevId: 201478331
Diffstat (limited to 'tensorflow/contrib/distribute/python/values.py')
-rw-r--r--tensorflow/contrib/distribute/python/values.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tensorflow/contrib/distribute/python/values.py b/tensorflow/contrib/distribute/python/values.py
index 72def62c79..389b01d3cd 100644
--- a/tensorflow/contrib/distribute/python/values.py
+++ b/tensorflow/contrib/distribute/python/values.py
@@ -26,7 +26,6 @@ import weakref
import six
-from tensorflow.contrib.data.python.ops import batching
from tensorflow.contrib.distribute.python import input_ops
from tensorflow.contrib.distribute.python import prefetching_ops_v2
from tensorflow.python.eager import context
@@ -614,8 +613,7 @@ class PerDeviceDataset(object):
# TODO(priyag): If dropping remainder is not appropriate, find another
# approach to distributing the dataset when not possible to divide evenly.
# Possibly not an issue when we start using PartitionedDataset.
- self._dataset = dataset.apply(
- batching.batch_and_drop_remainder(len(devices)))
+ self._dataset = dataset.batch(len(devices), drop_remainder=True)
def make_one_shot_iterator(self):
"""Get a one time use iterator for the distributed PerDeviceDataset."""