yiyixuxu / polyloss-pytorch

Implementing PolyLoss in Pytorch
72 stars 13 forks source link

Passing probability into CrossEntropy #5

Open Tma2333 opened 2 years ago

Tma2333 commented 2 years ago

torch.nn.CrossEntropyLoss expect you to pass raw, unnormalized logit, however, either logit or probability is passing into cross entropy loss. If the probability is used will lead to unintended result.