在jupyter notebooks上运行tensorflow-keras的Mask R-CNN时遇到如下错误:

  参考博客中写了两种解决方案:

  解决方案一:报错是由于keras版本不对造成的。load_weighs_from_hdf5_group_by_name这个属性只在keras 2.0.8版本中出现(不清楚现在的新版本是否支持这个属性),要是你的版本大于2.0.8,就找不到这个属性了。解决办法是卸载现有版本,安装keras 2.0.8。具体操作:

  进入cmd命令行,运行如下两条命令:

 pip uninstall keras
pip install keras==2.0.

  解决方案二:(我使用了这个方法,成功解决。方案来源github issues:https://github.com/matterport/Mask_RCNN/issues/694

  在Mask R-CNN源码文件夹里,找到mrcnn/model.py文件,用“saving”替换"topology",总共替换三处,如下图

  注释掉的三句是原来的代码,注释下一行就是改后的代码,都将topology替换成了saving。

  替换后成功运行。

  参考至:https://blog.csdn.net/c20081052/article/details/80745969

AttributeError:module 'keras.engine.topology' has no attribute 'load_weights_from_hdf5_group_by_name的更多相关文章

  1. module 'keras.engine.topology' has no attribute 'load_weights_from_hdf5_group_by_name'

    参考: https://blog.csdn.net/heiheiya/article/details/81111932 https://blog.csdn.net/c20081052/article/ ...

  2. Python 报错 AttributeError: module 'django.db.models' has no attribute 'SubfieldBase'

    AttributeError: module 'django.db.models' has no attribute 'SubfieldBase' http://www.guanggua.com/qu ...

  3. pyinstaller打包:AttributeError: module ‘win32ctypes.pywin32.win32api’ has no attribute ‘error’

    pyinstaller打包:AttributeError: module 'win32ctypes.pywin32.win32api' has no attribute 'error' 是因为pyin ...

  4. AttributeError: module 'Crypto.PublicKey.RSA' has no attribute 'import_key'

    I solved this problem by pip install pycryptodome

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

    #AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu' 的原因主要是版本的问题 解决方法是更新 ...

  6. python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?

    python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...

  7. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  8. attributeError:'module' object has no attribute ** 解决办法

    写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...

  9. AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

    /*************************************************************************** * AttributeError: 'modu ...

随机推荐

  1. 关键词提取算法TF-IDF与TextRank

    一.前言 随着互联网的发展,数据的海量增长使得文本信息的分析与处理需求日益突显,而文本处理工作中关键词提取是基础工作之一. TF-IDF与TextRank是经典的关键词提取算法,需要掌握. 二.TF- ...

  2. django 使用mysql数据库

    一 修改settings里面的配置文件 import pymysql # 一定要添加这两行!通过pip install pymysql! 或者pycharm 里面安装 pymysql.install_ ...

  3. 解决GitHub下载资源慢的问题

    打开 C:\Windows\System32\drivers\etc\hosts 添加 # GitHub 解决下载速度慢的问题 192.30.253.113 github.com 151.101.18 ...

  4. 用qpython3写一个发送短信的程序

    用qpython3写一个最简单的发送短信的程序 用qpython3写一个最简单的发送短信的程序到目前为止并没有多少手机应用是用python开发的,不过qpython可以作为一个不错的玩具推荐给大家来玩 ...

  5. Linux根文件系统和目录结构及bash特性2

    Linux系统上的文件类型:    -:常规文件,即f    d:directory,目录文件    b:block device,块设备文件,支持以“block”为单位进行随机访问    c:cha ...

  6. Ubuntu 18.04 安装配置 MySQL 5.7

    Ubuntu 18.04 安装 mysql 的过程中,竟然没有让你输入秘密?!(之前在 Ubuntu 14.04 下,安装过程中会询问密码),这导致安装完 mysql 初始秘密不知道的问题. $ su ...

  7. 异步IO框架:asyncio 中篇

    上一节我们首先介绍了,如何创建一个协程对象.主要有两种方法 通过async关键字, 通过@asyncio.coroutine 装饰函数. 然后有了协程对象,就需要一个事件循环容器来运行我们的协程.其主 ...

  8. 浅谈浏览器存储(cookie、localStorage、sessionStorage)

    今天我们从前端的角度了解一下浏览器存储,我们常见且常用的存储方式主要由两种:cookie.webStorage(localStorage和sessionStorage).下面我们来一一认识它们. Co ...

  9. (六)监控磁盘IO

    (1)被监控端配置 #vi /etc/zabbix/zabbix_agentd.conf UnsafeUserParameters= UserParameter=custom.vfs.dev.read ...

  10. 解决laydate动态设置初始值的问题

    //初始化//注意:我这里是时间范围选择,所以定义了range属性.var timeScope = laydate.render({ elem: '#time_scope', range: '~', ...