TensorFlow2.0-Examples icon indicating copy to clipboard operation
TensorFlow2.0-Examples copied to clipboard

TypeError when image_demo.py

Open warriors30n11 opened this issue 5 years ago • 1 comments

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.

warriors30n11 avatar Feb 11 '20 09:02 warriors30n11

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.

I also have this problem.Do you solve it?

gxqnba avatar Feb 24 '20 07:02 gxqnba