diff options
author | Asim Shankar <ashankar@google.com> | 2018-03-07 12:03:56 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-07 12:10:42 -0800 |
commit | 37cef895bfe06913477b87917cbee7284aefa7cd (patch) | |
tree | 4f05a013578c0459a52fc5e6448bb3dfc2d04971 /tensorflow/python/framework/tensor_util.py | |
parent | 808b569e85df8d63590740f05bc14d964efc4801 (diff) |
eager: Rename in_eager_mode to executing_eagerly and get rid of in_graph_mode.
This is in preparation to introduce one public, stable symbol: tf.executing_eagerly()
(i.e., part of moving APIs related to eager execution from "contrib" to a namespace
where we provide API stability guarantees)
PiperOrigin-RevId: 188212646
Diffstat (limited to 'tensorflow/python/framework/tensor_util.py')
-rw-r--r-- | tensorflow/python/framework/tensor_util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/framework/tensor_util.py b/tensorflow/python/framework/tensor_util.py index 135562e831..984bcecdfe 100644 --- a/tensorflow/python/framework/tensor_util.py +++ b/tensorflow/python/framework/tensor_util.py @@ -828,7 +828,7 @@ def constant_value_as_shape(tensor): # pylint: disable=invalid-name Returns: A `TensorShape` based on the constant value of the given `tensor`. """ - if context.in_eager_mode(): + if context.executing_eagerly(): return tensor_shape.as_shape( [dim if dim != -1 else None for dim in tensor.numpy()]) |