Target size that is different to the input size

(Sorry for the late reply)

Yes, I know :slight_smile:
it is because you are trying to put the output values of the bertClassifier into a function (sigmoid) that needs a tensor to produce while the output of the model just values (loss and logtis). In this case, you don’t need a sigmoid, we can say you just had it from the bertClassifier. you can eliminate output = torch.sigmoid(output).
Hope this helps you :wink: