Hello, I have a dataset of text and labels and I want to do multiclass classification. I have 5 classes. I follow this toturial: Text Classification Pytorch | Build Text Classification Model
But I needed to change the loss function to be:CrossEntropyLoss
loss = criterion(predictions, batch.Rating)
this error keeps showing:
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
Could you please help me with how can I call this loss function?