aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/distribute/python/mirrored_strategy.py
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-06-12 09:51:04 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-12 09:56:39 -0700
commitb0a15f21d2009ead9c8ed5e245a02b5c42355853 (patch)
treec510b2d9996def66f345b2022120c49a89701a4c /tensorflow/contrib/distribute/python/mirrored_strategy.py
parent3b4f4164663da4c65807c34e7188e43c9d7d7535 (diff)
Make the return value of `read_var` consistently a tensor instead of
sometimes a variable. PiperOrigin-RevId: 200231463
Diffstat (limited to 'tensorflow/contrib/distribute/python/mirrored_strategy.py')
-rw-r--r--tensorflow/contrib/distribute/python/mirrored_strategy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/distribute/python/mirrored_strategy.py b/tensorflow/contrib/distribute/python/mirrored_strategy.py
index 403e47d94f..900aa10e93 100644
--- a/tensorflow/contrib/distribute/python/mirrored_strategy.py
+++ b/tensorflow/contrib/distribute/python/mirrored_strategy.py
@@ -349,7 +349,7 @@ class MirroredStrategy(distribute_lib.DistributionStrategy):
if isinstance(tower_local_var, values.TowerLocalVariable):
return math_ops.add_n(self.unwrap(tower_local_var))
assert isinstance(tower_local_var, values.Mirrored)
- return tower_local_var.get()
+ return array_ops.identity(tower_local_var.get())
def _fetch(self, val, destination, fn):
"""Return a copy of `val` or `fn(val)` on `destination`."""