-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Issue with saving the best model state #667
Comments
Hi there 👋, Thank you so much for your attention to PyPOTS! You can follow me on GitHub to receive the latest news of PyPOTS. Best, |
Hi @yuanx749, thanks for raising this issue. I agree with you. I'm going to label this issue as |
Hi @WenjieDu , thanks for your quick response. I'll look into this next week, but since it's a small change, you can go ahead and make the fix if you'd like. :) |
No problem, Xiao. I've created PR #668 to fix it. Please have a review ;~) |
Issue description
Hi, thanks for this great tool!
I believe the line below should be
self.best_model_dict = deepcopy(self.model.state_dict())
. Otherwise the best model keeps getting updated, becausemodel.state_dict()
returns a reference to the dict.PyPOTS/pypots/base.py
Line 782 in 187852a
I encountered this issue when training a model with more epochs, I got different results even though the best model is at the same epoch.
Your contribution
As suggested in the description.
The text was updated successfully, but these errors were encountered: