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
搞定~~
AttributeError: module ‘tensorflow.python.ops.nn’ has no attribute ‘leaky_relu’的更多相关文章
- 启动Tensorboard时发生错误:class BeholderHook(tf.estimator.SessionRunHook): AttributeError: module 'tensorflow.python.estimator.estimator_lib' has no attribute 'SessionRunHook'
报错:class BeholderHook(tf.estimator.SessionRunHook):AttributeError: module 'tensorflow.python.estimat ...
- 成功解决 AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'
在导入keras包时出现这个问题,是因为安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本就OK了.可以在这个网址查看tensorfl ...
- AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'处理办法
原因:安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本. Keras与tensorflow版本匹配查询网站
- AttributeError: module 'tensorflow' has no attribute 'enable_eager_execution'
Traceback (most recent call last): File "linear_regression_eager_api.py", line 15, in < ...
- AttributeError: module 'tensorflow' has no attribute 'sub'
官方的例子:运行之后出现以下错误 # 进入一个交互式 TensorFlow 会话. import tensorflow as tf sess = tf.InteractiveSession() x = ...
- AttributeError: module 'tensorflow' has no attribute 'Session'
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/qq_33440324/article/ ...
- AttributeError: module 'selenium.webdriver.common.service' has no attribute 'Service'
今天爬虫时需要使用到selenium, 使用pip install selenium进行安装. 可是一开始写程序就遇到了AttributeError: module 'selenium.webdriv ...
- 关于moviepy打包报错AttributeError: module audio/video.fx.all has no attribute fadein、crop文章的纠错和抄袭
专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 老猿学5G博文目录 老猿前面有篇文章<moviepy应用pyin ...
- moviepy应用pyinstaller打包后执行报错AttributeError: module audio/video.fx.all has no attribute fadein、crop
专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 在开发moviepy的Python程序使用pyinstaller打包后 ...
随机推荐
- window.open 防止浏览器拦截
https://blog.csdn.net/sinat_37255207/article/details/89374416 网上试了很多方法 最终只有一种可以 var newWin = window. ...
- MAC上安装GCC失败
问题 在用brew安装GCC时, 报了如下错误. ➜ ~ brew install gcc ==> Installing dependencies for gcc: isl, mpfr and ...
- 打开 CRM 时,出现错误:"Invalid Action – The selected action was not valid"
今天当所有用户在打开CRM时,都出现了一个错误提示 “Invalid Action – The selected action was not valid”. 打开服务器的 event viewer查 ...
- SQL用法总全
https://www.yiibai.com/sql 比较全面 事务就是对数据库执行的工作单元.事务是完成逻辑顺序的工作,无论是在手动方式由用户或者自动地通过某种数据库程序的序列的单元. 事务是一个或 ...
- 【转】深入学习Redis(1):Redis内存模型
原文:https://www.cnblogs.com/kismetv/p/8654978.html 前言 Redis是目前最火爆的内存数据库之一,通过在内存中读写数据,大大提高了读写速度,可以说Red ...
- eclipse各种小图标含义
参考:https://wenku.baidu.com/view/69a0854df7ec4afe04a1df63.html outline: 实心的代表方法 空心的代表属性 绿色的圆表示公有pu ...
- JavaWeb基础—JSP
一.什么是JSP JSP 全称是 Java Server Pages,是一种开发动态web资源的技术 在原HTML上添加JAVA脚本(灵魂工程师,为页面添加灵魂),可以说 jsp = html + j ...
- mysql无法应用安全设置的解决方法
如果重复安装mysql,可能会导致这个错误,所以需要: 卸载mysql,把mysql的安装目录彻底删除,默认是 C:\Program Files\MySQL 删除后重新安装即可成功
- mysql查询操作之单表查询、多表查询、子查询
一.单表查询 单表查询的完整语法: .完整语法(语法级别关键字的排列顺序如下) select distinct 字段1,字段2,字段3,... from 库名.表名 where 约束条件 group ...
- 树莓派 Zero WH 初使用体验
12号买了一个树莓派 Zero WH,这个是什么型号呢?其实和树莓派Zero是同一系列的,加上W则表示多了无线Wifi和蓝牙模块,加上H则表示在板子上已经焊接好了2x20的排针. 这个Zero真的很迷 ...