-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify reduction behavior for an empty set of values (#5568)
Clarify the behavior of the reduction-ops when reducing an empty set of values, by updating the test-cases and documentation. It is useful in various edge-cases. For example, ReduceProd should return 1 for an empty tensor, and ReduceSum should return 0 for an empty tensor. (See #3651 (comment)) ### Summary ReduceSum ({}) = 0 ReduceProd ({}) = 1 ReduceMin ({}) = Max. value of datatype ReduceMax ({}) = Min. value of datatype ReduceLogSum ({}) = minus infinity or undefined for datatypes without minus infinity ReduceLogSumExp ({}) = minus infinity or undefined for datatypes without minus infinity ReduceMean ({}) = Undefined --------- Signed-off-by: Ganesan Ramalingam <grama@microsoft.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: gramalingam <gramalingam@users.noreply.github.com>
- Loading branch information
1 parent
d811848
commit 2b770ab
Showing
22 changed files
with
1,027 additions
and
94 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.