在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. 第十章· Logstash深入-Logstash与Redis那点事

    Logstash将日志写入Redis 为什么要使用Redis 在企业中,日志规模的量级远远超出我们的想象,这就是为什么会有一家公司日志易专门做日志收集,给大型金融公司收集日志,比如银行,因为你有可能看 ...

  2. deep_learning_neural network梯度下降

    神经网络优化算法:梯度下降法.Momentum.RMSprop和Adam 最近回顾神经网络的知识,简单做一些整理,归档一下神经网络优化算法的知识.关于神经网络的优化,吴恩达的深度学习课程讲解得非常通俗 ...

  3. (十三)Linux sysfs device_attribute

    /*************************************************************************** * Linux sysfs device_at ...

  4. c++ 一些注意事项

    1.long int的字节信息:int在32位系统下是4字节,long在32位也是4字节,在64位Int不变,但是long变成8字节,所以我们的编译器不同可能会导致我们处理int,long不同 2.注 ...

  5. DA_06_iptables 与 firewalld 防火墙

    8.1 防火墙管理工具 防火墙作为公网与内网之间的保护屏障,在保障数据的安全性方面起着至关重要的作用.主要功能都是依据策略对穿越防火墙自身的流量进行过滤.防火墙策略可以基于 流量的源目地址.端口号.协 ...

  6. jQuery和vue 设置ajax全局请求

    一个很常见的问题,如果用户登录网站session过期,需要用户返回登录页面重新登录. 如果是http请求可以在后台设置拦截器,统一拦截并跳转.但是ajax方法并不能通过后台直接跳转. 所以我们可以写一 ...

  7. Java-生成缩略图工具类

    import java.awt.Color; import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingH ...

  8. django 之csrf、auth模块及settings源码、插拔式设计

    目录 基于django中间件拷贝思想 跨站请求伪造简介 跨站请求伪造解决思路 方式1:form表单发post请求解决方法 方式2:ajax发post请求解决方法 csrf相关的两个装饰器 csrf装饰 ...

  9. PC监听鼠标和键盘事件,定时无响应退出

    直接上代码: window.onload = function () { initScreenSaver(); } //0912 add function ScreenSaver(settings){ ...

  10. [Python]Python3调用java代码

    环境:Ubuntu16.04 桌面版 Ubuntu安装java的详细教程:https://www.cnblogs.com/ttkl/p/11933884.html 安装JPype1 pip3 inst ...