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

File "demo.py", line 189 #13

Open
cloudwarn opened this issue Nov 16, 2017 · 3 comments
Open

File "demo.py", line 189 #13

cloudwarn opened this issue Nov 16, 2017 · 3 comments

Comments

@cloudwarn
Copy link

(Tensorflow) C:\Users\uxb\Desktop\ChatBotCourse-master\ChatBotCourse-master\chat
botv5>python demo.py train
File "demo.py", line 189
print 'step=', step, 'loss=', loss_ret, 'learning_rate=', learning_rate.eval
()
^
SyntaxError: invalid syntax

(Tensorflow) C:\Users\uxb\Desktop\ChatBotCourse-master\ChatBotCourse-master\chat
botv5>python demo.py predict
File "demo.py", line 189
print 'step=', step, 'loss=', loss_ret, 'learning_rate=', learning_rate.eval
()
^
SyntaxError: invalid syntax

@ahumoon7421
Copy link

这个是python2的语法。 所有的print适配成python3的语法即可print(xxx)

@ahumoon7421
Copy link

还有xrange需要替换成range, unicode类型需要替换成str,经替换后在python3上可以运行了。

@cloudwarn
Copy link
Author

好,谢谢

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