-
Notifications
You must be signed in to change notification settings - Fork 114
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
gpus > 1 #35
Comments
Hello, thank you for pointing that out. We will use this fix in the next coming PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems allRank suffers from what has been raised in this link
https://discuss.pytorch.org/t/solved-keyerror-unexpected-key-module-encoder-embedding-weight-in-state-dict/1686/3
So, instead of directly load the save model by:
model.load_state_dict(load_state_dict_from_file('model.pkl', dev))
We have to do the following:
state_dict = load_state_dict_from_file('model.pkl', dev)
new_state_dict = OrderedDict()
for k, v in state_dict.items():
name = k[7:] if 'module.' in k else k
new_state_dict[name] = v
model.load_state_dict(new_state_dict)
The text was updated successfully, but these errors were encountered: