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

保存模型参数和优化器参数 #22

Closed
CodeSniperYang opened this issue Dec 4, 2023 · 2 comments
Closed

保存模型参数和优化器参数 #22

CodeSniperYang opened this issue Dec 4, 2023 · 2 comments

Comments

@CodeSniperYang
Copy link

CodeSniperYang commented Dec 4, 2023

我想请教一下:保存模型的时候,同时保存优化器参数会不会更好?

模型配置文件:只有save_model为True和False的选项,没有关于优化器的。
train.py文件:我看到train.py文件中的save_model函数,里面未对优化器保存。

还是说保存优化器参数的代码在其他地方写了,只是我没看见。

希望解答一下 😃

@Re-bin
Copy link
Collaborator

Re-bin commented Dec 4, 2023

嗨 👋

感谢关注,目前的代码实现确实是只保存了训练好的模型的参数,然后关于优化器的参数例如learning rate之类的会保存在config中。不过在训练的时候,该次训练的所有超参数(包括优化器的)也会同时写在log文件里面方便参考 :)

Best regards,
Xubin

@CodeSniperYang
Copy link
Author

嗷~~~我知道啦!感谢感谢
爱你们 ❤️

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

2 participants