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

Validation metric difference between saving state_dict() and the whole model. #51

Open
Grace625 opened this issue Feb 19, 2023 · 0 comments

Comments

@Grace625
Copy link

Grace625 commented Feb 19, 2023

Thanks for your excellent work!

I use RepLKNet as the backbone of my depth estimation network. After validating the model at training time, I save it and immediately load it to validate again, but I get different validation metrics from the training time.

I use the standard way in PyTorch to save the state_dict() of RepLKNet, and when I use torch.save() to save the whole model rather than only save the state_dict() of the backbone, this problem disappears. Why does this happen? Looking forward to your reply.

@Grace625 Grace625 changed the title Validation metric difference between validating at training time and validating the saved model for downstream task. Validation metric difference between saving state_dict() and the whole model. Feb 20, 2023
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