aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/distribute/python/values.py
diff options
context:
space:
mode:
authorGravatar Priya Gupta <priyag@google.com>2018-03-29 19:24:58 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-29 19:27:22 -0700
commit28dec7f4669e8ed5af4a3abebf9888d3fdffe5fd (patch)
treebe5500f29cf7b988b6dab9c2c337228b1b624551 /tensorflow/contrib/distribute/python/values.py
parent28b95b35482d665a9483803ae9fb7b081b4f8a75 (diff)
Add basic serialization support to DistributedVariable (by using the underlying primary variable's serialization). Also, throw an exception when trying to de-serialize as we haven't implemented that yet.
PiperOrigin-RevId: 191022884
Diffstat (limited to 'tensorflow/contrib/distribute/python/values.py')
-rw-r--r--tensorflow/contrib/distribute/python/values.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/contrib/distribute/python/values.py b/tensorflow/contrib/distribute/python/values.py
index b5b7ec8381..9acb6a9db9 100644
--- a/tensorflow/contrib/distribute/python/values.py
+++ b/tensorflow/contrib/distribute/python/values.py
@@ -216,6 +216,9 @@ class DistributedVariable(DistributedDelegate):
def get_shape(self):
return self._primary_var.get_shape()
+ def to_proto(self, export_scope=None):
+ return self._primary_var.to_proto(export_scope=export_scope)
+
@property
def op(self):
# We want cross-tower code that does some var.op.X calls