{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/6478","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/6478/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/6478/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/6478/events","html_url":"https://github.com/tensorflow/tensorflow/issues/6478","id":197385285,"number":6478,"title":"t.eval() built with slim outputs wrong predictions when input batch contains identical images","user":{"login":"PhoenixDai","id":3335135,"avatar_url":"https://avatars.githubusercontent.com/u/3335135?v=3","gravatar_id":"","url":"https://api.github.com/users/PhoenixDai","html_url":"https://github.com/PhoenixDai","followers_url":"https://api.github.com/users/PhoenixDai/followers","following_url":"https://api.github.com/users/PhoenixDai/following{/other_user}","gists_url":"https://api.github.com/users/PhoenixDai/gists{/gist_id}","starred_url":"https://api.github.com/users/PhoenixDai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhoenixDai/subscriptions","organizations_url":"https://api.github.com/users/PhoenixDai/orgs","repos_url":"https://api.github.com/users/PhoenixDai/repos","events_url":"https://api.github.com/users/PhoenixDai/events{/privacy}","received_events_url":"https://api.github.com/users/PhoenixDai/received_events","type":"User","site_admin":false},"labels":[{"id":473172988,"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/type:bug/performance","name":"type:bug/performance","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"sguada","id":1766524,"avatar_url":"https://avatars.githubusercontent.com/u/1766524?v=3","gravatar_id":"","url":"https://api.github.com/users/sguada","html_url":"https://github.com/sguada","followers_url":"https://api.github.com/users/sguada/followers","following_url":"https://api.github.com/users/sguada/following{/other_user}","gists_url":"https://api.github.com/users/sguada/gists{/gist_id}","starred_url":"https://api.github.com/users/sguada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sguada/subscriptions","organizations_url":"https://api.github.com/users/sguada/orgs","repos_url":"https://api.github.com/users/sguada/repos","events_url":"https://api.github.com/users/sguada/events{/privacy}","received_events_url":"https://api.github.com/users/sguada/received_events","type":"User","site_admin":false},"assignees":[{"login":"sguada","id":1766524,"avatar_url":"https://avatars.githubusercontent.com/u/1766524?v=3","gravatar_id":"","url":"https://api.github.com/users/sguada","html_url":"https://github.com/sguada","followers_url":"https://api.github.com/users/sguada/followers","following_url":"https://api.github.com/users/sguada/following{/other_user}","gists_url":"https://api.github.com/users/sguada/gists{/gist_id}","starred_url":"https://api.github.com/users/sguada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sguada/subscriptions","organizations_url":"https://api.github.com/users/sguada/orgs","repos_url":"https://api.github.com/users/sguada/repos","events_url":"https://api.github.com/users/sguada/events{/privacy}","received_events_url":"https://api.github.com/users/sguada/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-12-23T15:16:56Z","updated_at":"2017-01-09T16:24:48Z","closed_at":null,"body":"When evaluating a model built with slim on a batch that contains identical images, the output of the batch will be wrong (mostly the outputs will be the most frequent label). For example, if my evaluation set has 421 images and my batch size is 40, I filled the last batch with 19 identical images (the 421st one) to avoid tensor shape mismatch error. Then,  the output for the 21st to the 40th image of the last batch will be the most common label in training set. If I replace the 19 images with some randomly selected images, the outputs will be correct.\r\n\r\n### What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?\r\n\r\nNone.\r\n\r\n### Environment info\r\nOperating System: Ubuntu 14.04.5\r\n\r\nInstalled version of CUDA and cuDNN: \r\n(please attach the output of `ls -l /path/to/cuda/lib/libcud*`):\r\n![image](https://cloud.githubusercontent.com/assets/3335135/21456479/56b99382-c8f6-11e6-88ee-1b83758fb56a.png)\r\n\r\nIf installed from binary pip package, provide:\r\n\r\n1. A link to the pip package you installed:\r\nhttps://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl\r\n\r\n2. The output from `python -c \"import tensorflow; print(tensorflow.__version__)\"`.\r\n\r\nI tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally\r\nI tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally\r\nI tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally\r\nI tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally\r\nI tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally\r\n0.11.0\r\n\r\n### If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)\r\nThe problem can be reproduced with any model built purely with slim but evaluated with output.eval(feed_dict={batch_image:test_batch}) or sess.run(output, feed_dict={batch_image:test_batch})\r\nwhen the test batch contains several identical images. \r\n\r\n### What other attempted solutions have you tried?\r\nAvoid identical or similar images in evaluation batch.\r\n\r\n### Logs or other output that would be helpful\r\n(If logs are large, please upload as attachment or provide link).\r\n"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/271330791","html_url":"https://github.com/tensorflow/tensorflow/issues/6478#issuecomment-271330791","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/6478","id":271330791,"user":{"login":"PhoenixDai","id":3335135,"avatar_url":"https://avatars.githubusercontent.com/u/3335135?v=3","gravatar_id":"","url":"https://api.github.com/users/PhoenixDai","html_url":"https://github.com/PhoenixDai","followers_url":"https://api.github.com/users/PhoenixDai/followers","following_url":"https://api.github.com/users/PhoenixDai/following{/other_user}","gists_url":"https://api.github.com/users/PhoenixDai/gists{/gist_id}","starred_url":"https://api.github.com/users/PhoenixDai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhoenixDai/subscriptions","organizations_url":"https://api.github.com/users/PhoenixDai/orgs","repos_url":"https://api.github.com/users/PhoenixDai/repos","events_url":"https://api.github.com/users/PhoenixDai/events{/privacy}","received_events_url":"https://api.github.com/users/PhoenixDai/received_events","type":"User","site_admin":false},"created_at":"2017-01-09T16:24:48Z","updated_at":"2017-01-09T16:24:48Z","body":"Oh, thank you so much for pointing this out. I will have a try and let you know how it goes. "}}
{"actor":{"display_login":"PhoenixDai"}}