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" #541

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix "Using a tf.Tensor as a Python bool is not allowed" #541

wants to merge 1 commit into from

Conversation

SnowWalkerJ
Copy link

At the current version of tflearn, using some modules could end up with:

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 replaced some judgements like "if b:" to "if b is not None" to avoid this.

@aymericdamien
Copy link
Member

Thanks for fixing this issue! Unfortunately the PR breaks due to the latest tflearn update. If you got time, would you mind rebase your code? Thanks!

@zxydi1992
Copy link

Can someone fix that?

@aldanor
Copy link

aldanor commented Jul 16, 2017

This should be closed ^

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

4 participants