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

Fix "using a tf.Tensor as a Python bool is not allowed" #820

Merged
merged 6 commits into from
Jul 12, 2017
Merged

Fix "using a tf.Tensor as a Python bool is not allowed" #820

merged 6 commits into from
Jul 12, 2017

Conversation

willduan
Copy link
Contributor

Since this issue is still not fixed in the past nine months, so I refix it

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.

So I fix it to make it more robust.

@willduan willduan closed this Jul 12, 2017
@aymericdamien aymericdamien reopened this Jul 12, 2017
Copy link
Member

@aymericdamien aymericdamien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for updating that old issue. And sorry that I missed your PR..

@aymericdamien aymericdamien merged commit 6fd2a9d into tflearn:master Jul 12, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants