You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttributeError: 'ExponentialMovingAverage' object has no attribute 'variables_to_restore' #802
Traceback (most recent call last):
File "cifar10_eval.py", line 161, in
tf.app.run()
File "/Library/Python/2.7/site-packages/tensorflow/python/platform/default/_app.py", line 30, in run
sys.exit(main(sys.argv))
File "cifar10_eval.py", line 157, in main
evaluate()
File "cifar10_eval.py", line 135, in evaluate
variables_to_restore = variable_averages.variables_to_restore()
AttributeError: 'ExponentialMovingAverage' object has no attribute 'variables_to_restore'
What is your tensorflow version? You might need master branch version of tensorflow to make that script running. (In 0.6.0, ExponentialMovingAverage has no attributes variables_to_restore, but master version has it.)
Yes it was version 0.6 as it says in the download section of tensorflow,
but i don't know how to install the master version as a package, should I
download the github repository on the library folder (
/Library/Python/2.7/site-packages/tensorflow/...) ?
Thanks a lot,
Manu
On Mon, Jan 18, 2016 at 3:30 PM, Aymeric Damien [email protected]
wrote:
What is your tensorflow version? You might need master branch version of
tensorflow to make that script running. (In 0.6.0, ExponentialMovingAverage
has no attributes variables_to_restore, but master version has it.)
—
Reply to this email directly or view it on GitHub #802 (comment)
.
After @aymericdamien recommendation I have copied the tensorflow folder with all the training scripts from master version (downloaded from github) into 0.6 (installed version, which is different) and now cifar10_eval goes a bit further, it doesn't say that 'ExponentialMovingAverage' object has no attribute 'variables_to_restore' but once in the variables to restore called function it says
...
File "/Library/Python/2.7/site-packages/tensorflow/python/training/moving_averages.py", line 307, in variables_to_restore
moving_avg_variables = list(set(variables.moving_average_variables() +
AttributeError: 'module' object has no attribute 'moving_average_variables'
...
If you're using the 0.6.0 pip installation, you should check out the code at the 0.6.0 branch. There's no guarantee that the scripts at HEAD will work with the old binaries, since we add features to HEAD and then update our examples.
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.
(tf)Carloss-MacBook-Pro:~ Carlos$ python ~/../../Volumes/Transcend/Dropbox/workspace/TensorFlow/CIFAR10/tensorflow-master-tensorflow-models-image-cifar10/cifar10_train.py
Traceback (most recent call last):
File "/Users/Carlos/../../Volumes/Transcend/Dropbox/workspace/TensorFlow/CIFAR10/tensorflow-master-tensorflow-models-image-cifar10/cifar10_train.py", line 43, in
import tensorflow.python.platform
File "/Users/Carlos/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/init.py", line 23, in
from tensorflow.python import *
File "/Users/Carlos/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/python/init.py", line 43, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/Users/Carlos/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/python/init.py", line 37, in
from tensorflow.core.framework.graph_pb2 import *
ImportError: No module named core.framework.graph_pb2
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.
I managed to run the example successfully again after using the version 0.6.0, which doesn't have the line
"variables_to_restore = variable_averages.variables_to_restore()"
in cifar10_eval
The commit 64f8a3b introduced a change in the API by adding the variables_to_restore() function.
You need to get the source code 0.6.0 of the example to run this example:
git clone https://github.com/tensorflow/tensorflow.git
git checkout 0.6.0
cd tensorflow/tensorflow/models/image/cifar10/
python cifar10_train.py --max_steps=20 # Just a few steps to check the script
python cifar10_eval.py --num_examples 1000 --run_once 1 # Just once to check the script
Thanks for the answer. I found the 0.6.0 tutorial and it works. (while still producing the big number of warnings and errors about the queues. Same as in #389 . It is something related to the threads but it takes place after the computation is complete).
Activity
manuvector commentedon Jan 18, 2016
I get the same error, I think that they have changed something on the code moving_averages.py code
aymericdamien commentedon Jan 18, 2016
What is your tensorflow version? You might need master branch version of tensorflow to make that script running. (In 0.6.0, ExponentialMovingAverage has no attributes variables_to_restore, but master version has it.)
manuvector commentedon Jan 18, 2016
Yes it was version 0.6 as it says in the download section of tensorflow,
but i don't know how to install the master version as a package, should I
download the github repository on the library folder (
/Library/Python/2.7/site-packages/tensorflow/...) ?
Thanks a lot,
Manu
On Mon, Jan 18, 2016 at 3:30 PM, Aymeric Damien [email protected]
wrote:
manuvector commentedon Jan 18, 2016
After @aymericdamien recommendation I have copied the tensorflow folder with all the training scripts from master version (downloaded from github) into 0.6 (installed version, which is different) and now cifar10_eval goes a bit further, it doesn't say that 'ExponentialMovingAverage' object has no attribute 'variables_to_restore' but once in the variables to restore called function it says
...
File "/Library/Python/2.7/site-packages/tensorflow/python/training/moving_averages.py", line 307, in variables_to_restore
moving_avg_variables = list(set(variables.moving_average_variables() +
AttributeError: 'module' object has no attribute 'moving_average_variables'
...
Any ideas?
josh11b commentedon Jan 19, 2016
Sherry, this looks related to 110808120 or 110781462.
vrv commentedon Jan 20, 2016
If you're using the 0.6.0 pip installation, you should check out the code at the 0.6.0 branch. There's no guarantee that the scripts at HEAD will work with the old binaries, since we add features to HEAD and then update our examples.
carlos-argueta commentedon Jan 20, 2016
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.
(tf)Carloss-MacBook-Pro:~ Carlos$ python ~/../../Volumes/Transcend/Dropbox/workspace/TensorFlow/CIFAR10/tensorflow-master-tensorflow-models-image-cifar10/cifar10_train.py
Traceback (most recent call last):
File "/Users/Carlos/../../Volumes/Transcend/Dropbox/workspace/TensorFlow/CIFAR10/tensorflow-master-tensorflow-models-image-cifar10/cifar10_train.py", line 43, in
import tensorflow.python.platform
File "/Users/Carlos/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/init.py", line 23, in
from tensorflow.python import *
File "/Users/Carlos/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/python/init.py", line 43, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/Users/Carlos/.virtualenvs/tf/lib/python2.7/site-packages/tensorflow/python/init.py", line 37, in
from tensorflow.core.framework.graph_pb2 import *
ImportError: No module named core.framework.graph_pb2
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.
manuvector commentedon Jan 22, 2016
I managed to run the example successfully again after using the version 0.6.0, which doesn't have the line
"variables_to_restore = variable_averages.variables_to_restore()"
in cifar10_eval
Thanks to the moderators!
amisios commentedon Feb 3, 2016
Manu or Carlos, could you elaborate a bit on how you solved this problem?
Or rather how this tutorial can work for tensorflow 0.6.0.
jguiraudet commentedon Feb 4, 2016
The commit 64f8a3b introduced a change in the API by adding the variables_to_restore() function.
You need to get the source code 0.6.0 of the example to run this example:
amisios commentedon Feb 4, 2016
Thanks for the answer. I found the 0.6.0 tutorial and it works. (while still producing the big number of warnings and errors about the queues. Same as in #389 . It is something related to the threads but it takes place after the computation is complete).
sherrym commentedon Apr 5, 2016
This should have long been fixed now that both the code and pip package containing this change has been available for several months.
Merge pull request tensorflow#802 from ROCmSoftwarePlatform/develop-u…
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA
Update XNNPACK in XLA