简体   繁体   English

SyntaxError:扫描字符串文字时 EOL 1

[英]SyntaxError: EOL while scanning string literal 1

enter image description here What do I need to do to make this code work?在此处输入图像描述我需要做什么才能使此代码正常工作? The brackets seems to be in the right place括号似乎在正确的位置

This is happening probably because you've copied some part of code from web, or have by mistake used '`' special character instead of "'"(single quote)发生这种情况可能是因为您从 web 复制了部分代码,或者错误地使用了 '`' 特殊字符而不是 "'"(单引号)
This error is present in 3 lines because of special character:由于特殊字符,此错误出现在 3 行中:

Line 6 (after relu word)第 6 行(在 relu 字之后)
Line 7 (after relu word)第 7 行(relu 字后)
Line 9 (around softmax).第 9 行(在 softmax 附近)。

activation=`relu'激活=`relu'

In this you have used this ` symbol to start it and you have ended it using ' - single quotes.在此,您使用了这个 ` 符号来启动它,并使用 ' - 单引号来结束它。 It starts treating the line after the single quotes as string.它开始将单引号后的行视为字符串。 So, this error has occured所以,发生了这个错误

I think, problem with symbols.我认为,符号的问题。 ' is not ' ' 不是 '

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM