Label smoothing for CrossEntropyLoss

Hi:
Are there some methods to hack the code to implement the label smoothing for CrossEntropyLoss? Because the target must be torch.LongTensor to hinder the soft target (torch.FloatTensor).

6 Likes

Mirror issue: https://github.com/pytorch/pytorch/issues/7455

1 Like