sorry that was my mistake the real code and error is this
input = torch.nn.Softmax(1)(target)
t =  torch.argmax(target, dim=2)
torch.nn.CrossEntropyLoss()(input,t)


ValueError: Expected target size (3, 4), got torch.Size([3, 3])