DeepLearningExamples icon indicating copy to clipboard operation
DeepLearningExamples copied to clipboard

模型加载问题

Open Qi-Code opened this issue 4 years ago • 0 comments

作者你好,我再python eval.py的时候报错,报错内容如下: Traceback (most recent call last): File "eval.py", line 13, in model = keras.models.load_model("best_model.h5") File "C:\Users\YuQiCode\anaconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\saving\save.py", line 146, in load_model return hdf5_format.load_model_from_hdf5(filepath, custom_objects, compile) File "C:\Users\YuQiCode\anaconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\saving\hdf5_format.py", line 184, in load_model_from_hdf5 training_config, custom_objects)) File "C:\Users\YuQiCode\anaconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\saving\saving_utils.py", line 235, in compile_args_from_training_config sample_weight_mode = training_config['sample_weight_mode'] KeyError: 'sample_weight_mode'

请问是因为什么原因呀,是模型保存出问题了吗

Qi-Code avatar Jan 15 '21 05:01 Qi-Code