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

你可能感兴趣的:(我爱Debug,Python)