1、AttributeError: module ‘tensorflow.python.ops.nn’ has no attribute ‘leaky_relu’ 的原因主要是版本的问题
我的解决方法是更新到对应的版本:keras 2.1.5
tensorflow-gpu 1.2.1
更新的操作如下(使用国内镜像):
pip install keras==2.1.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install tensorflow-gpu==1.2.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
2、PyCharm出现module ‘matplotlib’ has no attribute ‘verbose’解决方案
在File -> settings -> Tools -> Python Scientific 将勾去掉。
参考文献:
1、https://github.com/keras-team/keras/issues/9349 2018.4.8
2、https://blog.csdn.net/lambert310/article/details/52412059 2018.4.8
3、http://www.mamicode.com/info-detail-2219568.html 2018.4.8