ENH Adds label_smoothing to cross entropy loss (#63122)
authorThomas J. Fan <thomasjpfan@gmail.com>
Mon, 30 Aug 2021 06:31:42 +0000 (23:31 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 30 Aug 2021 06:33:04 +0000 (23:33 -0700)
commitd3bcba5f85f97ef273109924c695f33bf739e115
tree96f417957cbfb088c8000afdf8fb77fa04ef23a9
parent8af1407eab140a3abf12ea99883fea529791883e
ENH Adds label_smoothing to cross entropy loss (#63122)

Summary:
Fixes https://github.com/pytorch/pytorch/issues/7455

Partially resolves pytorch/vision#4281

Pull Request resolved: https://github.com/pytorch/pytorch/pull/63122

Reviewed By: iramazanli

Differential Revision: D30586076

Pulled By: jbschlosser

fbshipit-source-id: 06afc3aa1f8b9edb07fe9ed68c58968ad1926924
14 files changed:
aten/src/ATen/native/LossNLL.cpp
aten/src/ATen/native/native_functions.yaml
test/cpp/api/functional.cpp
test/cpp/api/modules.cpp
test/test_nn.py
torch/csrc/api/include/torch/nn/functional/loss.h
torch/csrc/api/include/torch/nn/options/loss.h
torch/csrc/api/src/nn/modules/loss.cpp
torch/nn/functional.py
torch/nn/functional.pyi.in
torch/nn/modules/loss.py
torch/onnx/symbolic_opset12.py
torch/overrides.py
torch/testing/_internal/common_nn.py