-
Notifications
You must be signed in to change notification settings - Fork 81
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
Problems in the process of reproducing the code #44
Comments
Hi, this error came out when you were loading the model parameters. Could you re-check the number of labels in the model configuration (currently you are using 2)? It should match the model parameters, which is 4 for the number of labels. |
Thank you for the code! |
As mentioned in the requirements.txt file, the python version should be 3.6 |
When I wrote this code, I used python 3.6 so I am sure it should work. |
Thank you for open-sourcing the code!
In the process of reproducing, the following problems appeared:
Error(s) in loading state_dict for BertForSequenceClassification:
size mismatch for classifier.weight: copying a param with shape torch.Size([4, 768]) from checkpoint, the shape in current model is torch.Size([2, 768]).
size mismatch for classifier.bias: copying a param with shape torch.Size([4]) from checkpoint, the shape in current model is torch.Size([2]).
I haven't solved it, can you help me? Thanks!
The text was updated successfully, but these errors were encountered: