{"action":"closed","issue":{"url":"https://api.github.com/repos/yuanming-hu/fc4/issues/8","repository_url":"https://api.github.com/repos/yuanming-hu/fc4","labels_url":"https://api.github.com/repos/yuanming-hu/fc4/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/yuanming-hu/fc4/issues/8/comments","events_url":"https://api.github.com/repos/yuanming-hu/fc4/issues/8/events","html_url":"https://github.com/yuanming-hu/fc4/issues/8","id":324922702,"number":8,"title":"TypeError: Using a `tf.Tensor` as a Python `bool` is not allowed.","user":{"login":"yt605155624","id":24568452,"avatar_url":"https://avatars2.githubusercontent.com/u/24568452?v=4","gravatar_id":"","url":"https://api.github.com/users/yt605155624","html_url":"https://github.com/yt605155624","followers_url":"https://api.github.com/users/yt605155624/followers","following_url":"https://api.github.com/users/yt605155624/following{/other_user}","gists_url":"https://api.github.com/users/yt605155624/gists{/gist_id}","starred_url":"https://api.github.com/users/yt605155624/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yt605155624/subscriptions","organizations_url":"https://api.github.com/users/yt605155624/orgs","repos_url":"https://api.github.com/users/yt605155624/repos","events_url":"https://api.github.com/users/yt605155624/events{/privacy}","received_events_url":"https://api.github.com/users/yt605155624/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"yuanming-hu","id":6553256,"avatar_url":"https://avatars2.githubusercontent.com/u/6553256?v=4","gravatar_id":"","url":"https://api.github.com/users/yuanming-hu","html_url":"https://github.com/yuanming-hu","followers_url":"https://api.github.com/users/yuanming-hu/followers","following_url":"https://api.github.com/users/yuanming-hu/following{/other_user}","gists_url":"https://api.github.com/users/yuanming-hu/gists{/gist_id}","starred_url":"https://api.github.com/users/yuanming-hu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuanming-hu/subscriptions","organizations_url":"https://api.github.com/users/yuanming-hu/orgs","repos_url":"https://api.github.com/users/yuanming-hu/repos","events_url":"https://api.github.com/users/yuanming-hu/events{/privacy}","received_events_url":"https://api.github.com/users/yuanming-hu/received_events","type":"User","site_admin":false},"assignees":[{"login":"yuanming-hu","id":6553256,"avatar_url":"https://avatars2.githubusercontent.com/u/6553256?v=4","gravatar_id":"","url":"https://api.github.com/users/yuanming-hu","html_url":"https://github.com/yuanming-hu","followers_url":"https://api.github.com/users/yuanming-hu/followers","following_url":"https://api.github.com/users/yuanming-hu/following{/other_user}","gists_url":"https://api.github.com/users/yuanming-hu/gists{/gist_id}","starred_url":"https://api.github.com/users/yuanming-hu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuanming-hu/subscriptions","organizations_url":"https://api.github.com/users/yuanming-hu/orgs","repos_url":"https://api.github.com/users/yuanming-hu/repos","events_url":"https://api.github.com/users/yuanming-hu/events{/privacy}","received_events_url":"https://api.github.com/users/yuanming-hu/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-05-21T13:48:18Z","updated_at":"2018-05-22T09:03:01Z","closed_at":"2018-05-22T09:03:01Z","author_association":"NONE","body":"Hello ,I am using tensorflow-gpu 1.2.0 to run your training code and meet this problem\r\nTraceback (most recent call last):\r\n  File \"fc4.py\", line 240, in <module>\r\n    globals()[mode](*sys.argv[2:])\r\n  File \"fc4.py\", line 172, in train\r\n    fcn = FCN(sess=sess, name=name, kwargs=kwargs)\r\n  File \"/media/yt/fc4/fcn.py\", line 54, in __init__\r\n    self.build()\r\n  File \"/media/yt/fc4/fcn.py\", line 174, in build\r\n    fc2 = self.build_branches(self.images, self.dropout)\r\n  File \"/media/yt/fc4/fcn.py\", line 107, in build_branches\r\n    fc1 = slim.dropout(fc1, dropout)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/framework/python/ops/arg_scope.py\", line 181, in func_with_args\r\n    return func(*args, **current_args)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/layers/python/layers/layers.py\", line 1216, in dropout\r\n    _scope=sc)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/layers/core.py\", line 247, in __init__\r\n    self.rate = min(1., max(0., rate))\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py\", line 578, in __nonzero__\r\n    raise TypeError(\"Using a `tf.Tensor` as a Python `bool` is not allowed. \"\r\nTypeError: 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.\r\n\r\n\r\nIt said that  I should  **Use `if t is not None:` instead of `if t:** but I can't find a \"if t \" in your code,Could you please help me to fix this problem?"}}
{"actor":{"display_login":"yt605155624"}}