I am a new user of Pytorch.
I’d like to use the cross-entropy loss function
number of classes=2
output.shape=[4,2,224,224]
output_min=tensor(-1.9295)]
output_max=tensor(2.6400)]
number of channels=3
target.shape=[4,3,224,224]
targets_max=tensor(-2.1008)]
targets_min=tensor(-2.1179)]
how to evaluate:
loss = criterion(output, target)?
Thanks.