diff options
Diffstat (limited to 'tensorflow/python/ops/variables.py')
-rw-r--r-- | tensorflow/python/ops/variables.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/python/ops/variables.py b/tensorflow/python/ops/variables.py index 5a1a43b5d5..ee1e361093 100644 --- a/tensorflow/python/ops/variables.py +++ b/tensorflow/python/ops/variables.py @@ -723,7 +723,8 @@ class Variable(object): """The `Graph` of this variable.""" return self._variable.graph - def get_shape(self): + @property + def shape(self): """The `TensorShape` of this variable. Returns: @@ -731,6 +732,10 @@ class Variable(object): """ return self._variable.get_shape() + def get_shape(self): + """Alias of Variable.shape.""" + return self.shape + def to_proto(self, export_scope=None): """Converts a `Variable` to a `VariableDef` protocol buffer. |