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

SyntaxError: invalid syntax #28

Open
zhjmcjk opened this issue Sep 27, 2018 · 3 comments
Open

SyntaxError: invalid syntax #28

zhjmcjk opened this issue Sep 27, 2018 · 3 comments

Comments

@zhjmcjk
Copy link

zhjmcjk commented Sep 27, 2018

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
Copy link

beduffy commented Sep 27, 2018

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

@zhjmcjk
Copy link
Author

zhjmcjk commented Sep 27, 2018

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
Copy link

beduffy commented Sep 27, 2018

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

It was only added for the first time in Python 3.6

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