#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’的更多相关文章

  1. 启动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 ...

  2. 成功解决 AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'

    在导入keras包时出现这个问题,是因为安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本就OK了.可以在这个网址查看tensorfl ...

  3. AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'处理办法

    原因:安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本. Keras与tensorflow版本匹配查询网站  

  4. AttributeError: module 'tensorflow' has no attribute 'enable_eager_execution'

    Traceback (most recent call last): File "linear_regression_eager_api.py", line 15, in < ...

  5. AttributeError: module 'tensorflow' has no attribute 'sub'

    官方的例子:运行之后出现以下错误 # 进入一个交互式 TensorFlow 会话. import tensorflow as tf sess = tf.InteractiveSession() x = ...

  6. AttributeError: module 'tensorflow' has no attribute 'Session'

      版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/qq_33440324/article/ ...

  7. AttributeError: module 'selenium.webdriver.common.service' has no attribute 'Service'

    今天爬虫时需要使用到selenium, 使用pip install selenium进行安装. 可是一开始写程序就遇到了AttributeError: module 'selenium.webdriv ...

  8. 关于moviepy打包报错AttributeError: module audio/video.fx.all has no attribute fadein、crop文章的纠错和抄袭

    专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 老猿学5G博文目录 老猿前面有篇文章<moviepy应用pyin ...

  9. moviepy应用pyinstaller打包后执行报错AttributeError: module audio/video.fx.all has no attribute fadein、crop

    专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 在开发moviepy的Python程序使用pyinstaller打包后 ...

随机推荐

  1. 前端实现文件在线预览txt,pdf,doc,xls,ppt几种格式

    做法就是使用iframe标签 1.text,pdf的文件预览 <iframe class="filename" :src="文件的地址" width='1 ...

  2. rpm-yum_install_software

    rpm -ivh software_name安装软件 打印详情rpm -q software_name查询软件是否安装rpm -ql software_name查询安装目录rpm -e softwar ...

  3. WebGl 多缓冲区传递颜色和坐标(矩形)

    效果: 代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="U ...

  4. 关于groupby与层次化索引的联系和层次化标签的使用

    groupby出来对象并不是dataFrame,所以直接print是看不到矩阵或者高维矩阵的,所以需要用能够产生标量值的方法去处理groupby对象,这样可以利用矩阵形式处理高维数据: 这样group ...

  5. 20155338《网络对抗技术》 Exp1 PC平台逆向破解

    20155338<网络对抗技术> Exp1 PC平台逆向破解 实践目标 1.实践的对象是一个名为pwn1的linux可执行文件. 2.该程序正常执行流程是:main调用foo函数,foo函 ...

  6. Oracle数据库的非归档模式迁移到归档模式

    先观察当前的状态: [root@o_target ~]# su - oracle    [oracle@o_target ~]$ sqlplus / as sysdba        SQL*Plus ...

  7. 4 jdngo vue-rotue

    . 执行linux命令 与mac命令   git base 3 初始化操作  页面加载完成,发起请求  window.onload

  8. Codeforces Round #452 (Div. 2)

    第一次打..(太弱(+99积分是几个意思 A 题意:一堆数,只有1和2,问最多凑出多少个3. 分情况即可 #include<cstdio> int main(){ int a=0,b=0, ...

  9. 十二、基于Django实现RBAC权限管理

    一.RBAC概述 RBAC(Role-Based Access Control,基于角色的访问控制),通过角色绑定权限,然后给用户划分角色. 从企业的角度来说,基本上是按照角色来划分职能.比如,CEO ...

  10. frp+TeamViewer 完美解决TeamViewer5分钟商业提醒

    必要条件:必须有一个公网服务器 frp是一个开源的端口转发工具,中文使用说明及下载地址在这里  https://github.com/fatedier/frp/blob/master/README_z ...