-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ONNX] Add OnnxToTorch lowering for Onnx.NegativeLogLikelihoodLoss Op (…
…#3380) This implements the Onnx.NegativeLogLikelihoodLoss op using the signature provided [here](https://onnx.ai/onnx/operators/onnx__NegativeLogLikelihoodLoss.html) by replacing it with a `NLLLossForward` op. Additionally, I included a helper function `get_loss_reduction_enum` to convert from a string `reduction` parameter to the corresponding intended integer value since this is an operation that will be reused for any loss function module. This differs from `get_reduction_enum` in `TorchUpstream.cpp` which handles the `reduce` parameter from `scatter_reduce` type operations.
- Loading branch information
1 parent
2ea2bc3
commit 09c9880
Showing
4 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters