Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Template' object has no attribute 'variable_scope' #10

Closed
AjayTalati opened this issue Feb 9, 2017 · 2 comments
Closed

Comments

@AjayTalati
Copy link

AjayTalati commented Feb 9, 2017

Hello, I wonder if you can help with this error message?

`(rllab3) ajay@ALPHA:~/PythonProjects/learning-to-learn-master_p3$ python3 train.py --problem=mnist
Extracting MNIST-data/train-images-idx3-ubyte.gz
Extracting MNIST-data/train-labels-idx1-ubyte.gz
Extracting MNIST-data/t10k-images-idx3-ubyte.gz
Extracting MNIST-data/t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):
File "train.py", line 115, in
tf.app.run()
File "/home/ajay/anaconda3/envs/rllab3/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "train.py", line 60, in main
problem, net_config, net_assignments = util.get_config(FLAGS.problem)
File "/home/ajay/PythonProjects/learning-to-learn-master_p3/util.py", line 96, in get_config
problem = problems.mnist(layers=(20,), mode=mode)
File "/home/ajay/PythonProjects/learning-to-learn-master_p3/problems.py", line 165, in mnist
initializers=_nn_initializers)
File "/home/ajay/PythonProjects/learning-to-learn-master_p3/nn/mlp.py", line 84, in init
self._instantiate_layers()
File "/home/ajay/PythonProjects/learning-to-learn-master_p3/nn/mlp.py", line 100, in_instantiate_layers
with tf.variable_scope(self._template.variable_scope):

AttributeError: 'Template' object has no attribute 'variable_scope'
`

My environment is : tf 0.12.1 python 3.5

I've tried searching on the www but can't find anything to fix it?

Thanks a lot :)

@normanheckscher
Copy link
Contributor

You'll need to either:

Use the tf-0.12 branch
https://github.com/deepmind/learning-to-learn/tree/tf-0.12

use tf 1.0rc1 instead of 0.12.1
https://www.tensorflow.org/versions/r1.0/

@sergomezcol
Copy link
Contributor

Exactly, there were a lot of API breaking changes in TensorFlow 1.0 so the master branch is only compatible with that version. As @normanheckscher suggested, you can either upgrade to the latest version of TensorFlow or use the code in the tf-0.12 branch in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants