在Google Colab上将遮罩rcnn与keras 2.4.3一起使用

问题描述

我正在尝试在Colab上运行Mask-rcnn以进行金属缺陷检测(https://github.com/maxkferg/metal-defect-detection)。 colab的Keras版本是2.4.3,而库keras版本是2.1.3。在加载砝码时出现以下错误

model.load_weights(model_path,by_name=True,exclude=EXCLUDE_LAYER_WEIGHTS):
AttributeError                            Traceback (most recent call last)
<ipython-input-2-a24cb8cfa577> in <module>()
----> 1 model.load_weights(model_path,exclude=EXCLUDE_LAYER_WEIGHTS)

/content/drive/My Drive/Colab Notebooks/Metal-defect-detection/model.py in load_weights(self,filepath,by_name,exclude)
   2030 
   2031         if by_name:
-> 2032             topology.load_weights_from_hdf5_group_by_name(f,layers)
   2033 
   2034         else:

AttributeError: module 'keras.engine.topology' has no attribute 'load_weights_from_hdf5_group_by_name'

我尝试了一些在线建议的解决方案,例如:用保存替换拓扑,但是我有同样的问题。有一种方法可以更改代码,以便在keras 2.4.3中使用此类存储库?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)