Say, I have 3 classes, and my output looks like this: (Batch x channel x H x W x D) 32 x 3 x 25 x 25 x 25.
Since the cross entropy function requires 2D input (N,C), I changed my input to this, using .view():
(500000,3)
500000 is because 32x25x25x25.
I also changed the label to this dimension: (500000).
Then I put them to the loss function: loss = criterion(output,label).
Is it correct to do so? Thanks in advance!!