utterworks / fast-bert

Super easy library for BERT based NLP models
Apache License 2.0
1.86k stars 341 forks source link

Error when using roberta-large-openai-detector for classification #210

Open saurabh502 opened 4 years ago

saurabh502 commented 4 years ago

Hi , When using roberta-large-openai-detector for multiclass classification , I am getting below error: RuntimeError: Error(s) in loading state_dict for RobertaForSequenceClassification: size mismatch for classifier.out_proj.weight: copying a param with shape torch.Size([2, 1024]) from checkpoint, the shape in current model is torch.Size([4, 1024]). size mismatch for classifier.out_proj.bias: copying a param with shape torch.Size([2]) from checkpoint, the shape in current model is torch.Size([4]).

This is working fine when using : roberta-base roberta-large distilroberta-base

Ekaanth commented 2 years ago

Hi, any update on the issue? Were you able to resolve it??