From 55cd3abd0228d60c41ac187313939777b09d3cbe Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 5 Mar 2019 02:37:31 -0800 Subject: [PATCH] Fix `TPUMirroredVariable.device` when called within a TPU context. PiperOrigin-RevId: 236814142 --- tensorflow/python/distribute/values.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/python/distribute/values.py b/tensorflow/python/distribute/values.py index 374810e1284..9d54f0b1a2f 100644 --- a/tensorflow/python/distribute/values.py +++ b/tensorflow/python/distribute/values.py @@ -904,7 +904,7 @@ class TPUMirroredVariable(trackable.Trackable): @property def device(self): - return self._get().device + return self.handle.device def eval(self, session=None): return self.primary.eval(session)