{"action":"created","issue":{"url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/674","repository_url":"https://api.github.com/repos/ppwwyyxx/tensorpack","labels_url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/674/labels{/name}","comments_url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/674/comments","events_url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/674/events","html_url":"https://github.com/ppwwyyxx/tensorpack/issues/674","id":300173433,"number":674,"title":"No gradient defined for operation \"BatchNorm\"","user":{"login":"junsukchoe","id":28227991,"avatar_url":"https://avatars3.githubusercontent.com/u/28227991?v=4","gravatar_id":"","url":"https://api.github.com/users/junsukchoe","html_url":"https://github.com/junsukchoe","followers_url":"https://api.github.com/users/junsukchoe/followers","following_url":"https://api.github.com/users/junsukchoe/following{/other_user}","gists_url":"https://api.github.com/users/junsukchoe/gists{/gist_id}","starred_url":"https://api.github.com/users/junsukchoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junsukchoe/subscriptions","organizations_url":"https://api.github.com/users/junsukchoe/orgs","repos_url":"https://api.github.com/users/junsukchoe/repos","events_url":"https://api.github.com/users/junsukchoe/events{/privacy}","received_events_url":"https://api.github.com/users/junsukchoe/received_events","type":"User","site_admin":false},"labels":[{"id":303824357,"url":"https://api.github.com/repos/ppwwyyxx/tensorpack/labels/unrelated","name":"unrelated","color":"e6e6e6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-26T09:58:08Z","updated_at":"2018-02-27T06:33:38Z","closed_at":"2018-02-27T00:39:56Z","author_association":"NONE","body":"Hi,\r\n\r\nI work with your examples \"Improved-WGAN.py\".\r\n\r\nI want to get gradients by using tf.gradients.\r\nIt works when I used LayerNorm for discriminator.\r\nBut, it does not work when I change LayerNorm to BatchNorm.\r\n\r\nThe error message is \r\n\r\n> No gradient defined for operation 'gradients/discrim/discrim_1/bn1/FusedBatchNorm_grad/FusedBatchNormGrad' (op type: FusedBatchNormGrad).\r\n\r\n\r\nThe full error logs is as follows:\r\n\r\n> Traceback (most recent call last):\r\n>   File \"DCGANGP_cifar.py\", line 388, in <module>\r\n>     model=M).train_with_defaults(\r\n>   File \"/srv/repository/object_localization/GAN.py\", line 90, in __init__\r\n>     d_min = opt.minimize(model.d_loss, var_list=model.d_vars, name='d_op')\r\n>   File \"/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py\", line 315, in minimize\r\n>     grad_loss=grad_loss)\r\n>   File \"/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py\", line 386, in compute_gradients\r\n>     colocate_gradients_with_ops=colocate_gradients_with_ops)\r\n>   File \"/home/junsuk/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gradients_impl.py\", line 516, in gradients\r\n>     (op.name, op.type))\r\n> LookupError: No gradient defined for operation 'gradients/discrim/discrim_1/bn1/FusedBatchNorm_grad/FusedBatchNormGrad' (op type: FusedBatchNormGrad)\r\n\r\nIt seems that there is no implementation for providing gradient information in BatchNorm op.\r\n\r\nI use Python 3.6, Tensorpack 0.8.0, Tensorflow 1.3.\r\n\r\nThank you.\r\nJunsuk.\r\n"},"comment":{"url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/comments/368762679","html_url":"https://github.com/ppwwyyxx/tensorpack/issues/674#issuecomment-368762679","issue_url":"https://api.github.com/repos/ppwwyyxx/tensorpack/issues/674","id":368762679,"user":{"login":"junsukchoe","id":28227991,"avatar_url":"https://avatars3.githubusercontent.com/u/28227991?v=4","gravatar_id":"","url":"https://api.github.com/users/junsukchoe","html_url":"https://github.com/junsukchoe","followers_url":"https://api.github.com/users/junsukchoe/followers","following_url":"https://api.github.com/users/junsukchoe/following{/other_user}","gists_url":"https://api.github.com/users/junsukchoe/gists{/gist_id}","starred_url":"https://api.github.com/users/junsukchoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junsukchoe/subscriptions","organizations_url":"https://api.github.com/users/junsukchoe/orgs","repos_url":"https://api.github.com/users/junsukchoe/repos","events_url":"https://api.github.com/users/junsukchoe/events{/privacy}","received_events_url":"https://api.github.com/users/junsukchoe/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T06:33:38Z","updated_at":"2018-02-27T06:33:38Z","author_association":"NONE","body":"I update my tensorflow, and it works well.\r\nThanks you!"}}
{"actor":{"display_login":"junsukchoe"}}