python keras SyntaxError: invalid syntax: f'at {latest_checkpoint}.重试。'



我得到

SyntaxError:无效语法:f'at{latest_checkpoint}。正在重试。'

当我尝试代码时,height.py((导入keras 时出错

File "height.py", line 9, in <module>
from keras import layers
File "/home/jekang39/anaconda2/envs/dl_gwas/lib/python2.7/site-packages/keras/__init__.py", line 22, in <module>
from keras import distribute
File "/home/jekang39/anaconda2/envs/dl_gwas/lib/python2.7/site-packages/keras/distribute/__init__.py", line 18, in <module>
from keras.distribute import sidecar_evaluator
File "/home/jekang39/anaconda2/envs/dl_gwas/lib/python2.7/site-packages/keras/distribute/sidecar_evaluator.py", line 209
f'at {latest_checkpoint}. Retrying. '
^
SyntaxError: invalid syntax

如果有人有解决错误的线索,请告诉我

转到位置->local/lib/python2.7/site packages/keras/<您的_file_name_in_which_it_shows_error>。py

问题是额外的";f";添加到此处的字母。这就是它显示错误的原因。在文本编辑器中手动打开该文件并删除该字母";f";。它应该在{latest_checkpoint}处为"。正在重试。'

它对我有效

相关内容

最新更新