Could you post the shapes of the model’s output and the target?



 XiaoAHeng:

and for 2 classes my ground truth is in the range[0,1]


This should work, if you provide these values as discrete values in a LongTensor.