将hdf5模型保存成h5模型

resnet_mcnn_model = M_CNN(img_shape, img_shape, mask_shape, num_class)
resnet_mcnn_weight = "D:/workspace/weights-improvement-150-0.9472.hdf5"
resnet_mcnn_model.load_weights(resnet_mcnn_weight)
print('mcnn load weight done-')
resnet_mcnn_model_file = './models/resnetv1_mcnn_mask_1222.h5'
if not os.path.exists(resnet_mcnn_model_file):
    resnet_mcnn_model.save(resnet_mcnn_model_file)

将hdf5模型保存为h5模型。

你可能感兴趣的:(深度学习理解篇)