zhaipro / easy12306

使用机器学习算法完成对12306验证码的自动识别
Artistic License 2.0
2.89k stars 737 forks source link

the model was *not* compiled. Compile it manually #14

Closed wangsai0806 closed 5 years ago

wangsai0806 commented 5 years ago

E:\ProgramData\Anaconda3\lib\site-packages\keras\engine\saving.py:292: UserWarning: No training configuration found in save file: the model was not compiled. Compile it manually. warnings.warn('No training configuration found in save file: '

运行mlearn.py的时候,出现这个错误,请问怎么解决,谢谢

zhaipro commented 5 years ago

不,这只是一个警告,其原因是我在保存模型时扔掉了优化器,为其减轻体重…

如果你只是用它,可以这样:

  1. 人工忽略
  2. 加个参数使加载时跳过编译

如果你还需要训练它:

  1. 再编译它一下
wangsai0806 commented 5 years ago

嗯嗯,感谢

YoungXueya commented 5 years ago

不,这只是一个警告,其原因是我在保存模型时扔掉了优化器,为其减轻体重…

如果你只是用它,可以这样:

  1. 人工忽略
  2. 加个参数使加载时跳过编译

如果你还需要训练它:

  1. 再编译它一下

请问如何在加载时跳过编译呢?

zhaipro commented 5 years ago

请问如何在加载时跳过编译呢?

哇,我一个有强迫症的患者都选择忽略警告了,而你却…

In [47]: keras.models.load_model?
Signature: keras.models.load_model(filepath, custom_objects=None, compile=True)