My input to the cross entropy loss function is torch.Size([69856, 21]) and target is torch.Size([69856]) and output is torch.Size([]).
When I mention nn.CrossEntropyLoss(reduce=None) it is giving empty tensor
when I mention nn.CrossEntropyLoss(reduce=False) it gives correct output shape but values are Nan.
Please help me solve this issue.