TensorFlow2.0-Examples
TensorFlow2.0-Examples copied to clipboard
TypeError when image_demo.py
When I execute image_demo.py at the beginning, it occurs error like this:
TypeError: Using a tf.Tensor
as a Python bool
is not allowed. Use if t is not None:
instead of if t:
to test if a tensor is defined, and use TensorFlow ops such as tf.cond to execute subgraphs conditioned on the value of a tensor.
I search this problem on the Internet, but I still don't know where is the problem.
When I execute image_demo.py at the beginning, it occurs error like this:
TypeError: Using a
tf.Tensor
as a Pythonbool
is not allowed. Useif t is not None:
instead ofif t:
to test if a tensor is defined, and use TensorFlow ops such as tf.cond to execute subgraphs conditioned on the value of a tensor.I search this problem on the Internet, but I still don't know where is the problem.
I also have this problem.Do you solve it?