Thanks for the update.



 Patrice:

My output shape is [4,2, 128,128,128]. The target shape is [4,1,128,128,128].


This should raise an error in F.cross_entropy, as the target contains a channel dimension, which is not expected.