aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/ops/variables.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/ops/variables.py')
-rw-r--r--tensorflow/python/ops/variables.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/python/ops/variables.py b/tensorflow/python/ops/variables.py
index dc73ad78a7..5a1a43b5d5 100644
--- a/tensorflow/python/ops/variables.py
+++ b/tensorflow/python/ops/variables.py
@@ -196,8 +196,9 @@ class Variable(object):
dtype=dtype,
expected_shape=expected_shape)
- def __str__(self):
- return str(self._snapshot)
+ def __repr__(self):
+ return "<tf.Variable '%s' shape=%s dtype=%s>" % (
+ self.name, self.get_shape(), self.dtype.name)
def _init_from_args(self,
initial_value=None,