提交 7a94c890 编写于 作者: G gtgalone 提交者: Waleed

Fix Keras engine topology to saving

上级 cbff80f3
......@@ -2094,7 +2094,7 @@ class MaskRCNN():
exlude: list of layer names to excluce
"""
import h5py
from keras.engine import topology
from keras.engine import saving
if exclude:
by_name = True
......@@ -2116,9 +2116,9 @@ class MaskRCNN():
layers = filter(lambda l: l.name not in exclude, layers)
if by_name:
topology.load_weights_from_hdf5_group_by_name(f, layers)
saving.load_weights_from_hdf5_group_by_name(f, layers)
else:
topology.load_weights_from_hdf5_group(f, layers)
saving.load_weights_from_hdf5_group(f, layers)
if hasattr(f, 'close'):
f.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册