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

Error(s) in loading state_dict for ElectraForTokenClassification #28

Open
lijiayi980130 opened this issue Nov 21, 2020 · 2 comments
Open

Comments

@lijiayi980130
Copy link

size mismatch for classifier.weight: copying a param with shape torch.Size([8, 1024]) from checkpoint, the shape in current model is torch.Size([9, 1024]).
Hello,I want to know why your file,"config.json"only has 8 labels for conll2003 datasets,I think it should have 9 labels.

@stefan-it
Copy link
Collaborator

Hi @lijiayi980130 ,

good question, I think you're referring to our model:

https://huggingface.co/dbmdz/electra-large-discriminator-finetuned-conll03-english

The reason for 8 labels is, that the original dataset is IOB1 labelled (yes, there are some IOB2 labelled datasets on the internet, but these are not the official ones):

$ cat eng.t* | cut -d " " -f 4 | grep -v "^$" | sort | uniq
B-LOC
B-MISC
B-ORG
I-LOC
I-MISC
I-ORG
I-PER
O

I hope this clarifies the label list entries in the configuration file 🤗

@lijiayi980130
Copy link
Author

Thank you ! I think I know

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

2 participants