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

Learning-to-learn code doesn't run after dependencies met AFAIK with an error message. #6

Closed
shyamalschandra opened this issue Jan 18, 2017 · 2 comments

Comments

@shyamalschandra
Copy link

I tried the following command as instructed by the directions in the README.md:

python train.py --problem=mnist --save_path=./mnist

The output from the run:

iMac:learning-to-learn shyamalsuhanachandra$ python train.py --problem=mnist --save_path=./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
Optimizee variables
[u'mlp/linear_0/w:0', u'mlp/linear_0/b:0', u'mlp/linear_1/w:0', u'mlp/linear_1/b:0']
Problem variables
[]
Traceback (most recent call last):
  File "train.py", line 115, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "train.py", line 68, in main
    second_derivatives=FLAGS.second_derivatives)
  File "/Users/shyamalsuhanachandra/learning-to-learn/meta.py", line 398, in meta_minimize
    info = self.meta_loss(make_loss, len_unroll, **kwargs)
  File "/Users/shyamalsuhanachandra/learning-to-learn/meta.py", line 370, in meta_loss
    reset = [tf.variables_initializer(variables), fx_array.close()]
AttributeError: 'module' object has no attribute 'variables_initializer'

What should I do to solve this problem as I am running the code for the first time?

@sergomezcol
Copy link
Contributor

tf.variables_initializer replaced tf.initialize_all_variables in TensorFlow 0.12 (https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md#breaking-changes-to-the-api-1). It sounds like you're using an older version.

Any chance you can upgrade to the latest version of TensorFlow and try to rerun the script?

@shyamalschandra
Copy link
Author

Thanks! It works now!

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

2 participants