Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Using a tf.Tensor as a Python bool is not allowed. #57

Open
99sbr opened this issue Apr 24, 2020 · 5 comments
Open

TypeError: Using a tf.Tensor as a Python bool is not allowed. #57

99sbr opened this issue Apr 24, 2020 · 5 comments

Comments

@99sbr
Copy link

99sbr commented Apr 24, 2020

Screenshot 2020-04-24 at 9 59 49 AM

@99sbr 99sbr changed the title 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. TypeError: Using a tf.Tensor as a Python bool is not allowed. Apr 24, 2020
@99sbr
Copy link
Author

99sbr commented Apr 24, 2020

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.

@wdkhuans
Copy link

wdkhuans commented May 2, 2020

maybe you can change if self.bias is not None instead of if self.bias in graph.py

@RamonBeast
Copy link

did you manage to find a solution to this issue? I am having the same problem with the latest TF unfortunately.

@kshitijnair
Copy link

getting the same error here for TF v2.0.0 cant seem to find a solution. anyone?

@tinmodeHuang
Copy link

you need to rebuild it with setup.py before run the script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants