aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/framework
diff options
context:
space:
mode:
authorGravatar Yan Facai (颜发才) <facai.yan@gmail.com>2018-08-21 11:51:19 +0800
committerGravatar Yan Facai (颜发才) <facai.yan@gmail.com>2018-08-21 11:51:19 +0800
commita5559a9d28bab6abfd65a9fad116ef9c6e13f8c2 (patch)
treef3b58a2342c5dc5050da342a665ee384114d302b /tensorflow/contrib/framework
parent8fbafe6c7e75e1d931eca7202ea3a4c5ac8fc2dd (diff)
CLN: rename _shape_tensor_equal to _shape_tensor_compatible
Diffstat (limited to 'tensorflow/contrib/framework')
-rw-r--r--tensorflow/contrib/framework/python/framework/tensor_util.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/contrib/framework/python/framework/tensor_util.py b/tensorflow/contrib/framework/python/framework/tensor_util.py
index c8fc1789c7..bdf8aeb2b8 100644
--- a/tensorflow/contrib/framework/python/framework/tensor_util.py
+++ b/tensorflow/contrib/framework/python/framework/tensor_util.py
@@ -130,8 +130,8 @@ def remove_squeezable_dimensions(predictions, labels, name=None):
return predictions, labels
-def _shape_tensor_equal(expected_shape, actual_shape):
- """Returns whether actual_shape is equal to expected_shape.
+def _shape_tensor_compatible(expected_shape, actual_shape):
+ """Returns whether actual_shape is compatible with expected_shape.
Note that -1 in `expected_shape` is recognized as unknown dimension.
@@ -182,7 +182,7 @@ def _is_shape(expected_shape, actual_tensor, actual_shape=None):
is_rank = _is_rank(array_ops.size(expected_shape), actual_tensor)
if actual_shape is None:
actual_shape = array_ops.shape(actual_tensor, name='actual')
- shape_equal = _shape_tensor_equal(expected_shape, actual_shape)
+ shape_equal = _shape_tensor_compatible(expected_shape, actual_shape)
return math_ops.logical_and(is_rank, shape_equal, name=scope)