openai / supervised-reptile

Code for the paper "On First-Order Meta-Learning Algorithms"
https://arxiv.org/abs/1803.02999
MIT License
996 stars 214 forks source link

Error running script #5

Closed nattari closed 6 years ago

nattari commented 6 years ago

When i run the below command, python -u run_omniglot.py --shots 1 --inner-batch 25 --inner-iters 3 --meta-step 1 --meta-batch 10 --meta-iters 100000 --eval-batch 25 --eval-iters 5 --learning-rate 0.001 --meta-step-final 0 --train-shots 15 --checkpoint ckpt_o15t --transductive

I get this error: Traceback (most recent call last): File "run_omniglot.py", line 9, in from supervised_reptile.args import argument_parser, model_kwargs, train_kwargs, evaluate_kwargs File "/Users/nazu/meta_learning/supervised-reptile/supervised_reptile/args.py", line 10, in from .reptile import Reptile, FOML File "/Users/nazu/meta_learning/supervised-reptile/supervised_reptile/reptile.py", line 149 def init(self, *args, tail_shots=None, **kwargs): ^ SyntaxError: invalid syntax

The python version I am using is 'Python 2.7.13' and tensorflow 1.6.0 Can you please tell me how can I possibly solve the error?

TIA

unixpickle commented 6 years ago

This code requires Python 3. I suggest using something like anaconda to get the latest version.

nattari commented 6 years ago

Thank you! It worked.