carpedm20 / ENAS-pytorch

PyTorch implementation of "Efficient Neural Architecture Search via Parameters Sharing"
Apache License 2.0
2.69k stars 492 forks source link

SyntaxError: invalid syntax #28

Open zhjmcjk opened 5 years ago

zhjmcjk commented 5 years ago

hello, guys. I have implemented ENAS-pytorch on my computer. When I run this command: python main.py --network_type rnn --dataset ptb --controller_optim adam --controller_lr 0.00035 --shared_optim sgd --shared_lr 20.0 --entropy_coeff 0.0001 i got a SyntaxError as the picture shown:

image

beduffy commented 5 years ago

You need Python 3.6 :). Or just remove the f.

zhjmcjk commented 5 years ago

Wow, it seems working well when I remove the f. Thanks for your help! By the way, the version of Python I used is 3.5. how the f works in Python 3.6, and why it can't work in Python 3.5.
I am sorry for the inconvenience. @beduffy

beduffy commented 5 years ago

https://cito.github.io/blog/f-strings/

It was only added for the first time in Python 3.6