I have N classes and my output of the convolution is in shape of
BxNxDxD, where B is the batch size, N is the number of classes, and D is the dimension of the out put.
I am trying re-implement ssd object detection.
so basically if i call my output Out, Out[0,:,0,0] is the classification results for position (0,0),
I made my GT to be in the same shape as Out, and i send Out to the  Out = nn.Softmax2d(Out) , but i dont know how should i use the GT and Out for computing cross entropy loss at the end.