Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模型加载问题 #15

Open
Qi-Code opened this issue Jan 15, 2021 · 0 comments
Open

模型加载问题 #15

Qi-Code opened this issue Jan 15, 2021 · 0 comments

Comments

@Qi-Code
Copy link

Qi-Code commented Jan 15, 2021

作者你好,我再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'

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant