AttributeError: module ‘tensorflow.python.ops.nn’ has no attribute ‘leaky_relu’


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

搞定~~


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM