Introduce MeanSquaredError as Loss Function#2570
Merged
wschin merged 50 commits intoonnx:masterfrom Feb 21, 2020
Merged
Conversation
lara-hdr
reviewed
Jan 24, 2020
wschin
reviewed
Jan 27, 2020
wschin
reviewed
Jan 28, 2020
wschin
reviewed
Jan 28, 2020
Contributor
|
Looks good to me. Wei-Sheng will help you further review this in details. |
lara-hdr
reviewed
Jan 28, 2020
lara-hdr
reviewed
Jan 29, 2020
lara-hdr
reviewed
Jan 29, 2020
lara-hdr
reviewed
Jan 29, 2020
Collaborator
|
This PR introduces a new operator. Please make sure this PR follows the rules agreed by Operator SIG |
wschin
reviewed
Jan 30, 2020
gramalingam
reviewed
Feb 14, 2020
gramalingam
approved these changes
Feb 14, 2020
wschin
approved these changes
Feb 14, 2020
Collaborator
wschin
left a comment
There was a problem hiding this comment.
Thanks for all the hard works.
SherlockNoMad
approved these changes
Feb 20, 2020
codemzs
added a commit
to codemzs/onnx
that referenced
this pull request
Apr 25, 2020
This reverts commit d2fe4f2. # Conflicts: # docs/Changelog.md # docs/Operators.md # docs/TestCoverage.md # onnx/defs/math/defs.cc # onnx/defs/operator_sets.h
codemzs
added a commit
to codemzs/onnx
that referenced
this pull request
Apr 26, 2020
This reverts commit d2fe4f2. # Conflicts: # docs/Changelog.md # docs/Operators.md # docs/TestCoverage.md # onnx/defs/math/defs.cc # onnx/defs/operator_sets.h
This was referenced Apr 26, 2020
Closed
jcwchen
pushed a commit
to jcwchen/onnx
that referenced
this pull request
Sep 23, 2020
* Initial commit for Mean square error loss operator * Update defs.cc * Use opset 12 instead of 10 * Add Changelog.md * Add Operators.md * Add test for Mean Square Error * Add TestCoverage.md * Add more tests * Add propagation for shape and type * fix build issues * Update tests * Add onnx and pb files * Add shape and inference tests * Add documentation for score and label * Update documentation * Update tests * Use AddQueriedFunctionBody * hasInputShape check * Rename Error to Distance * Remove mean_square_error_none_weights * Update tests * Use SetContextDependentFunctionBodyBuilder * Update docs * fix flake8 errors * tab to space * tab to space * remove duplicate * update loss function * update docs * Address reviewers comments * Address comments * fix tests * update docs * transfer MeanSquaredDistance to math folder * update docs * update shape and inference propagation * Update docs * Add type annotation * Update type signature * Ignore type signature * Add whitespace * update docs Co-authored-by: Emad Barsoum <ebarsoum@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This ONNX function calculates loss using the equation for mean square error.
As inputs it takes tensors of arbitrary shapes and, depending on the reduction type, it outputs a scalar (if reduction is sum or mean) or the tensor of same shape as input (if reduction is none)
PyTorch: https://pytorch.org/docs/stable/nn.html#torch.nn.MSELoss
TensorFlow: https://www.tensorflow.org/api_docs/python/tf/keras/losses/MeanSquaredError