from tensorflow.python.keras.utils import tf_utils ImportError: cannot import name 'tf_utils'

Debug:在安装keras出现问题

问题:
from tensorflow.python.keras.utils import tf_utils
ImportError: cannot import name 'tf_utils'
原因:

Seems like it was a problem with keras 2.3.0, I installed keras 2.1.5 using pip and it works fine.

解决方案:
pip install keras==2.1.5 -i https://pypi.tuna.tsinghua.edu.cn/simple
参考来源

https://stackoverflow.com/questions/57985406/cannot-import-name-tf-utils-when-using-importing-keras

发布了140 篇原创文章 · 获赞 26 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/CLOUD_J/article/details/103101247