{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/802","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/802/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/802/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/802/events","html_url":"https://github.com/tensorflow/tensorflow/issues/802","id":127213990,"number":802,"title":"AttributeError: 'ExponentialMovingAverage' object has no attribute 'variables_to_restore'","user":{"login":"carlos-argueta","id":10866062,"avatar_url":"https://avatars.githubusercontent.com/u/10866062?v=3","gravatar_id":"","url":"https://api.github.com/users/carlos-argueta","html_url":"https://github.com/carlos-argueta","followers_url":"https://api.github.com/users/carlos-argueta/followers","following_url":"https://api.github.com/users/carlos-argueta/following{/other_user}","gists_url":"https://api.github.com/users/carlos-argueta/gists{/gist_id}","starred_url":"https://api.github.com/users/carlos-argueta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlos-argueta/subscriptions","organizations_url":"https://api.github.com/users/carlos-argueta/orgs","repos_url":"https://api.github.com/users/carlos-argueta/repos","events_url":"https://api.github.com/users/carlos-argueta/events{/privacy}","received_events_url":"https://api.github.com/users/carlos-argueta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"sherrym","id":12770037,"avatar_url":"https://avatars.githubusercontent.com/u/12770037?v=3","gravatar_id":"","url":"https://api.github.com/users/sherrym","html_url":"https://github.com/sherrym","followers_url":"https://api.github.com/users/sherrym/followers","following_url":"https://api.github.com/users/sherrym/following{/other_user}","gists_url":"https://api.github.com/users/sherrym/gists{/gist_id}","starred_url":"https://api.github.com/users/sherrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sherrym/subscriptions","organizations_url":"https://api.github.com/users/sherrym/orgs","repos_url":"https://api.github.com/users/sherrym/repos","events_url":"https://api.github.com/users/sherrym/events{/privacy}","received_events_url":"https://api.github.com/users/sherrym/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2016-01-18T12:07:51Z","updated_at":"2016-01-20T10:51:53Z","closed_at":null,"body":"I am running the code provided with the tutorial Convolutional Neural Networks https://www.tensorflow.org/versions/master/tutorials/deep_cnn/index.html \r\n\r\nThe training works fine, but when I run the evaluation I get the following error. I have not modified in any way the code, I am running it as is.\r\n\r\nCode snippet:\r\n...\r\n# Restore the moving average version of the learned variables for eval.\r\n    variable_averages = tf.train.ExponentialMovingAverage(\r\n        cifar10.MOVING_AVERAGE_DECAY)\r\n    variables_to_restore = variable_averages.variables_to_restore()\r\n    saver = tf.train.Saver(variables_to_restore)\r\n...\r\n\r\nError:\r\n\r\nTraceback (most recent call last):\r\n  File \"cifar10_eval.py\", line 161, in <module>\r\n    tf.app.run()\r\n  File \"/Library/Python/2.7/site-packages/tensorflow/python/platform/default/_app.py\", line 30, in run\r\n    sys.exit(main(sys.argv))\r\n  File \"cifar10_eval.py\", line 157, in main\r\n    evaluate()\r\n  File \"cifar10_eval.py\", line 135, in evaluate\r\n    variables_to_restore = variable_averages.variables_to_restore()\r\nAttributeError: 'ExponentialMovingAverage' object has no attribute 'variables_to_restore'\r\n\r\nPlease help,"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/173169861","html_url":"https://github.com/tensorflow/tensorflow/issues/802#issuecomment-173169861","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/802","id":173169861,"user":{"login":"carlos-argueta","id":10866062,"avatar_url":"https://avatars.githubusercontent.com/u/10866062?v=3","gravatar_id":"","url":"https://api.github.com/users/carlos-argueta","html_url":"https://github.com/carlos-argueta","followers_url":"https://api.github.com/users/carlos-argueta/followers","following_url":"https://api.github.com/users/carlos-argueta/following{/other_user}","gists_url":"https://api.github.com/users/carlos-argueta/gists{/gist_id}","starred_url":"https://api.github.com/users/carlos-argueta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlos-argueta/subscriptions","organizations_url":"https://api.github.com/users/carlos-argueta/orgs","repos_url":"https://api.github.com/users/carlos-argueta/repos","events_url":"https://api.github.com/users/carlos-argueta/events{/privacy}","received_events_url":"https://api.github.com/users/carlos-argueta/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T10:51:53Z","updated_at":"2016-01-20T10:51:53Z","body":"I have downloaded the master version from github just like @manucarbonell did. I am using a virtualenv called tf. If I don't activate the tf I keep on getting the original error. If I activate tf I get the following. Please advice.\r\n\r\n(tf)Carloss-MacBook-Pro:~ Carlos$ python ~/../../Volumes/Transcend/Dropbox/workspace/TensorFlow/CIFAR10/tensorflow-master-tensorflow-models-image-cifar10/cifar10_train.py \r\nTraceback (most recent call last):\r\n  File \"/Users/Carlos/../../Volumes/Transcend/Dropbox/workspace/TensorFlow/CIFAR10/tensorflow-master-tensorflow-models-image-cifar10/cifar10_train.py\", line 43, in <module>\r\n    import tensorflow.python.platform\r\n  File \"/Users/Carlos/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/__init__.py\", line 23, in <module>\r\n    from tensorflow.python import *\r\n  File \"/Users/Carlos/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/python/__init__.py\", line 43, in <module>\r\n    raise ImportError(msg)\r\nImportError: Traceback (most recent call last):\r\n  File \"/Users/Carlos/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/python/__init__.py\", line 37, in <module>\r\n    from tensorflow.core.framework.graph_pb2 import *\r\nImportError: No module named core.framework.graph_pb2\r\n\r\n\r\nError importing tensorflow.  Unless you are using bazel,\r\nyou should not try to import tensorflow from its source directory;\r\nplease exit the tensorflow source tree, and relaunch your python interpreter\r\nfrom there."}}