111394:

output : tensor([[-21.6479, -24.8251, 46.5167],
[ -7.8592, -16.6111, 24.4777]], device=‘cuda:0’)
target : tensor([2, 2], device=‘cuda:0’)


The shape of output and target isn’t the same. This shouldn’t be the expected result, right?
If not, how do you define your comparison of output and target to calculate loss? Are you defining a custom loss function for this?