AttributeError:module 'keras.engine.topology' has no attribute 'load_weights_from_hdf5_group_by_name
在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的更多相关文章
- 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/ ...
- Python 报错 AttributeError: module 'django.db.models' has no attribute 'SubfieldBase'
AttributeError: module 'django.db.models' has no attribute 'SubfieldBase' http://www.guanggua.com/qu ...
- pyinstaller打包:AttributeError: module ‘win32ctypes.pywin32.win32api’ has no attribute ‘error’
pyinstaller打包:AttributeError: module 'win32ctypes.pywin32.win32api' has no attribute 'error' 是因为pyin ...
- AttributeError: module 'Crypto.PublicKey.RSA' has no attribute 'import_key'
I solved this problem by pip install pycryptodome
- AttributeError: module ‘tensorflow.python.ops.nn’ has no attribute ‘leaky_relu’
#AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu' 的原因主要是版本的问题 解决方法是更新 ...
- python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?
python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- attributeError:'module' object has no attribute ** 解决办法
写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...
- AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
/*************************************************************************** * AttributeError: 'modu ...
随机推荐
- netty的断线重连问题
手里的这个项目需要作为客户端,不断的接收服务端发来的数据,用的netty框架,但是一直存在一个问题,就是断线重连问题. 什么是断线重连呢? 就是我们这个客户端要保证一直与服务端保持连接,这样客户端才能 ...
- TCP/IP网络知识
1.TCP/IP概念 TCP/IP不是单指一种传输协议,而是一组传输控制协议/互联网协议. 2.TCP/IP分层 (计算机网络中,实际应用的网络协议是TCP/IP协议族,TCP/IP的应用层大体上对应 ...
- 第五篇.python进阶
目录 第五篇.python进阶 1. 异常处理 2. 数字类型内置方法 2.定义: 3.常用操作+内置方法: 4.存一个值or多个值: 5.有序or无序: 6.可变和不可变 1.用途: 2.定义: 3 ...
- TCP超时与重传
TCP提供可靠的传输层.它使用的方法之一就是确认从另一端收到的数据.但数据和确认都有可能丢失.TCP通过在发送时设置一个定时器来解决这种问题.如果当定时器溢出时还没收到确认,他就重传数该数据.对任何实 ...
- sql分页查询(2005以后的数据库)和access分页查询
sql分页查询: select * from ( select ROW_NUMBER() over(order by 排序条件) as rowNumber,* from [表名] where 条件 ) ...
- 微服务之Nacos配置中心源码解析(二)
Nacos配置中心源码解析 源码入口 ConfigFactory.createConfigService ConfigService configService = NacosFactory.crea ...
- QTP(6)
一.检查点 1.标准检查点(Standard Checkpoint) 作用:检查对象的属性值是否正确 文本框对象:text 预期值 单选按钮对象:checked ON/OFF 下拉框对象:Select ...
- zencart设置默认货币三种方法
zencart设置默认货币为USD 方法一:mysql UPDATE configuration SET configuration_value = 'USD' WHERE configuration ...
- error LNK2019 : unresolved external symbol Zbar配置问题
原文链接:https://blog.csdn.net/MengchiCMC/article/details/77871714 出现error LNK2019 : unresolved external ...
- SSH服务端