Hi Safak,
Many thanks for your response. My batch size is 12, dim=1. An example tensor shape for my output is torch.Size([10, 3]) and for my labels it is torch.Size([10, 1]). I applied labels.flatten() - it did not show the error and calculated the loss. See below the code:

Predictions look ok to me but need to convert it into the label (get the max index). Do you know the best way of doing that? Thanks