keras模型load_weights加载后无法predict
model = model_class.creat_model()
modelpath =‘XXX.h5’
model = model.load_weights(modelpath)
加载后无法predict
报错 model没有predict属性
改用 keras.Model.load_weights(model,modelpath) 加载模型
model = model_class.creat_model()
modelpath =‘XXX.h5’
model = model.load_weights(modelpath)
加载后无法predict
报错 model没有predict属性
改用 keras.Model.load_weights(model,modelpath) 加载模型