在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. 自定义springboot-starter

    参考: https://juejin.im/entry/5b447cbbe51d45199566f752 https://www.baeldung.com/spring-boot-custom-sta ...

  2. java9 新特征

    Java 平台级模块系统 java模块化解决的问题:减少Java应用和Java核心运行时环境的大小与复杂性 模块化的 JAR 文件都包含一个额外的模块描述器.在这个模块描述器中, 对其它模块的依赖是通 ...

  3. ASE19团队项目alpha阶段model组 scrum2 记录

    本次会议于11月4日,19时整在微软北京西二号楼sky garden召开,持续25分钟. 与会人员:Jiyan He, Kun Yan, Lei Chai, Linfeng Qi, Xueqing W ...

  4. dubbo和zookeeper结合使用

    1.相关依赖引入 阿里的dubbo包含了spring相关内容,引入依赖时,需要排除,使用我们自己项目中的spring依赖 <!-- start..............dubbo....... ...

  5. Odoo的 数据添加修改删除代码和对应的方式

    完整的可用命令如下: (0, _ , {‘field’: value})新建一条记录并将其与之关联 (1, id, {‘field’: value})更新已关联记录的值 (2, id, _)移除关联并 ...

  6. DataGrip导出查询结果数据

    1 按钮 2 选择保存位置即可

  7. Kivy 简单尝试

    Kivy 简明教程 首先,有两个网址你不得不看: Kivy: Cross-platform Python Framework for NUI在官网逛逛,顺便看看最下面的代码,try to run it ...

  8. Oracle子句【group by、having】

    [分组查询]关键字:group by 分组字段名,分组字段名... --注意1:分组后,在select语句中只允许出现分组字段和多行函数 --注意2:如果是多字段分组,先按第一字段分组,然后每个小组继 ...

  9. python对ip地址排序、对列表进行去重

    一:使用python对ip地址排序所用代码示例一: import socket iplist = ['10.5.11.1','192.168.1.33','10.5.2.4','10.5.1.3',' ...

  10. 查看TensorFlow的版本以及安装路径

    查看TensorFlow的版本以及安装路径 进入到Python环境 import tensorflow as tf tf.__version__ # 查看版本 tf.__path__ # 查看安装路径 ...