diff options
author | Igor Ganichev <iga@google.com> | 2017-11-08 16:44:37 -0800 |
---|---|---|
committer | Andrew Selle <aselle@andyselle.com> | 2017-11-10 16:14:38 -0800 |
commit | 361c55899cb524ca078c65eabdd3d79bfc10c8f9 (patch) | |
tree | 7a76a6eb37192f4859f71ae27630a47a0532cb68 /tensorflow/python/util/tf_should_use.py | |
parent | a2147fdc59bce39441e56be7e4e86faf89f2a306 (diff) |
Make assert_equal/_none_equal/_less ops work in eager mode
Also, fix documentation of eager mode execute() method and
make tf_should_use work with empty list returned by execute()
RELNOTES: tf.assert_equal no longer raises ValueError. It now raises InvalidArgumentError, as documented.
PiperOrigin-RevId: 175086223
Diffstat (limited to 'tensorflow/python/util/tf_should_use.py')
-rw-r--r-- | tensorflow/python/util/tf_should_use.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/util/tf_should_use.py b/tensorflow/python/util/tf_should_use.py index a576547d5f..37733152e8 100644 --- a/tensorflow/python/util/tf_should_use.py +++ b/tensorflow/python/util/tf_should_use.py @@ -44,7 +44,7 @@ def _add_should_use_warning(x, fatal_error=False): and is a very shallow wrapper for `x` which logs access into `x`. """ del fatal_error - if x is None: # special corner case where x is None + if x is None or x == []: # pylint: disable=g-explicit-bool-comparison return x if context.in_eager_mode(): |