System Info
Hi,
I got the following issue RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #2 'target' in call to _thnn_nll_loss_forward when I was finetuning the stsb by using a finetuned roberta. I use this code to finetune the stsb task.

Does anyone have idea to fix the bug? The label for stsb is float type, so the code is using regression to train the model.
Who can help?
No response
Information
Tasks
Reproduction
- Download the finetuned roberta model from here. The finetuned roberta was finetuned on a sentence binary classification task. (The issue may caused by the first stage finetuning which I was using a binary classification task, but the downstream task stsb is a regression task.)
- Load the finetuned roberta model and use this code to finetune the stsb task and I got the above issue.
Expected behavior
Please give me any advice to solve the issue. Many Thanks.