model = model_class.creat_model()
modelpath =‘XXX.h5’
model = model.load_weights(modelpath)
加载后无法predict
报错 model没有predict属性
改用 keras.Model.load_weights(model,modelpath) 加载模型
keras模型load_weights加载后无法predict
最新推荐文章于 2022-05-31 15:55:10 发布
model = model_class.creat_model()
modelpath =‘XXX.h5’
model = model.load_weights(modelpath)
加载后无法predict
报错 model没有predict属性
改用 keras.Model.load_weights(model,modelpath) 加载模型