在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. js div模拟水平滚动条

    这个也是我百度到的,但是忘记保存连接了,现在把代码贴上来,有需要的可以参考一下: <!DOCTYPE html> <html> <head> <meta ch ...

  2. Redis-设置key过期

    Redis-设置key过期 expire key seconds 设置指定key 多少秒后过期, seconds 为 -1 时表示永不过期 ttl key 查看指定key还有多少秒过期 persist ...

  3. JDBC的两种sql命令发送器比较【Statement:PreparedStatement】

    PreparedStatement 接口继承 Statement接口如果需要多次执行一个SQL语句,可以使用PreparedStatement对象.在创建PreparedStatement对象时,通过 ...

  4. LNMP安装与配置之Python3

    环境 我们是在CentOS7下安装python3,但CentOS已经默认安装了Python2,而 Yum 等工具依赖原来的Python2.所以我们需要稍作配置让Python2与Python3可以共存. ...

  5. python的索引与切片和元祖

    '''索引: 1.索引从0开始 2.末尾元素为 -1 3.能被for循环,有序的数据集合 切片: 1.顾头不顾尾 2.a = "123abcdfg" print(a[0::2]) ...

  6. 记录一下linux下两个工具和一个伪代码转换流程图工具

    1.Linux下文本浏览器lynx 文本浏览器,顾名思义就是只有文本的浏览器,这个浏览器可以在命令行下打开使用 2.CURL 在Linux中curl是一个利用URL规则在命令行下工作的文件传输工具,可 ...

  7. 安装theano遇到的问题

    嗯,听说keras虽然说有TensorFlow有backend就够了,在TensorFlow和theano之间来回切换还是会有用的,然后又补安装了theano 之前解了权限了,所以不需要sudo 直接 ...

  8. 一道经典JS面试题

    超过80%的候选人对下面这道JS面试题的回答情况连及格都达不到.这究竟是怎样神奇的一道JS面试题?他考察了候选人的哪些能力?对正在读本文的你有什么启示? 不起眼的开始 招聘前端工程师,尤其是中高级前端 ...

  9. New!Devexpress WinForms各版本支持Visual Studo和SQL Server版本对应图

    点击获取DevExpress v19.2.3最新完整版试用下载 本文主要为大家介绍DevExpress WinForms各大版本支持的VS版本和支持的.Net版本图,Devexpress WinFor ...

  10. MariaDB使用enum和set

    1.enum 单选字符串数据类型,适合存储表单界面中的“单选值”. 设定enum的时候,需要给定“固定的几个选项”:存储的时候就只存储其中的一个值. 设定enum的格式: enum("选项1 ...