如何解决在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 举报,一经查实,本站将立刻删除。