Hello,
Yes, I solve it by changing the model. I am not sure why there is a nn.Linear
.
the tuto is the same as I followed I don’t see the purpose of using a linear layer at the end where we can just use BertForSequenceClassification
!
if you want to fix this model, you need to check the input/ouput of the bert model and the linear classifier or you can do as I did and change the model. You can use the bert classification model. It is the better solution.
Hope it will help you