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
Enhance the robustness of module_state_dict
#4587
Conversation
@LZHgrla, thanks for this PR. Could you please add a unit test like the follow?
|
@microsoft-github-policy-service agree |
@tjruwase Thanks for your reviews! The unit tests have been added~ |
Hi @tjruwase |
@tjruwase |
If user re-implements the `state_dict()` method of `self.module` and manually excludes the frozen parameters, this line will lead to `KeyError`.
If user re-implements the
state_dict()
method ofself.module
and manually excludes the frozen parameters, this line will lead toKeyError
.