1. 程式人生 > >python安裝tensorflow出現的問題

python安裝tensorflow出現的問題

問題描述:
先前安裝的是tensorflow-gpu(1.1.0)
1.module ‘tensorflow.python.ops.nn’ has no attribute ‘leaky_relu’
2.module ‘matplotlib’ has no attribute
解決方案
1.tensorflow的版本沒有‘leaky_relu’函式
使用國內映象下載安裝,指令
下載keras映象安裝

pip install tensorflow-gpu==1.4.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install keras==2.1
.2 -i https://pypi.tuna.tsinghua.edu.cn/simple

2.PyCharm出現module ‘matplotlib’ has no attribute ‘verbose’解決方案

在File -> settings -> Tools -> Python Scientific 將勾去掉。