安装Keras的步骤请参考以下链接:
Linux: https://keras-cn.readthedocs.io/en/latest/for_beginners/keras_linux/
Windows:https://keras-cn.readthedocs.io/en/latest/for_beginners/keras_windows/
根据步骤安装完毕后,import keras的时候可能会出现以下错误:
AttributeError: module 'keras_applications' has no attribute 'set_keras_submodules'
查看一下keras_applications的版本信息:
import keras_applications
print(keras_applications.__version__)
把keras_applications的版本降为1.0.7,import keras的时候就不会出现以上错误,可以正常使用了
pip install --upgrade keras_applications==1.0.7
本文详细介绍了在Linux和Windows环境下安装Keras的步骤,并针对import keras时可能遇到的AttributeError提供了解决方案,通过将keras_applications版本降为1.0.7来避免错误。

1万+

被折叠的 条评论
为什么被折叠?



