Hi all, I want to compute the cross-entropy between two 2D tensors that are the outputs of the softmax function.
        P=nn.CrossEntropyLoss(softmax_out1,softmax_out2)

softmax_out1 and softmax_out2 are 2D tensors with shapes (128,10) that 128 refers to the batch size and 10 is the number of classes.
the following error occurs:
RuntimeError: 1D target tensor expected, multi-target not supported

any example code to handle this error would be appreciated.