2020
10-07
10-07
keras load model时出现Missing Layer错误的解决方式
问题描述:训练结束后,保存model为hdf5和yaml格式的文件yamlFilename=os.path.join(dir,filename)yamlModel=model.toyaml()withopen(yamlFilename,"w")asyamlFile:yamlFile.write(yamlModel)随后loadmodelwithopen(chkptFilename,'r')asf:model_yaml=f.read()model=KM.model_from_yaml(model_yaml,customs_objects={"dict":dict})model.load_weights(weightFilename)但是报错问题分析:经过debug分析,原因出在...
继续阅读 >