pregenRobot:

Doesn’t this meet the requirement for calculating Cross EntropyLoss ?


No, since class labels are expected.
Use target = torch.argmax(target, dim=1) to create the expected target tensor.