(l-onnx-doc-ReduceSumSquare)= # ReduceSumSquare (l-onnx-op-reducesumsquare-18)= ## ReduceSumSquare - 18 ### Version - **name**: [ReduceSumSquare (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#ReduceSumSquare) - **domain**: `main` - **since_version**: `18` - **function**: `True` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 18**. ### Summary Computes the sum square of the input tensor's elements along the provided axes. The resulting tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are valid. Reduction over an empty set of values yields 0. The above behavior is similar to numpy, with the exception that numpy defaults `keepdims` to `False` instead of `True`. #### Function Body The function definition for this operator. ``` < domain: "", opset_import: ["" : 18] > ReduceSumSquare (data, axes) => (reduced) { data_square = Mul (data, data) reduced = ReduceSum (data_square, axes) } ``` ### Attributes * **keepdims - INT** (default is `'1'`): Keep the reduced dimension or not, default 1 means keep reduced dimension. * **noop_with_empty_axes - INT** (default is `'0'`): Defines behavior when axes is not provided or is empty. If false (default), reduction happens over all axes (similar to the case when `axis=None` in numpy). If true, reduction happens over an empty set of axes (similar to the case when `axis=()` in numpy). Note that reduction over an empty set of axes means that the reduction step behaves like a no-op (identity function), but composite-reduction operators will still perform the non-reduction steps as needed. Thus, ReduceLogSum returns the Log of input tensor, and ReduceSumSquare returns the Square of the input tensor, in this case. ### Inputs Between 1 and 2 inputs. - **data** (heterogeneous) - **T**: An input tensor. - **axes** (optional, heterogeneous) - **tensor(int64)**: Optional input list of integers, along which to reduce. The default is to reduce over empty axes. When axes is empty (either not provided or explicitly empty), behavior depends on 'noop_with_empty_axes': reduction over all axes if 'noop_with_empty_axes' is false, and reduction over the empty set of axes when 'noop_with_empty_axes' is true. Accepted range is [-r, r-1] where r = rank(data). ### Outputs - **reduced** (heterogeneous) - **T**: Reduced output tensor. ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int32)`, `tensor(int64)`, `tensor(uint32)`, `tensor(uint64)` ): Constrain input and output types to numeric tensors. ```{toctree} text_diff_ReduceSumSquare_13_18 ``` (l-onnx-op-reducesumsquare-13)= ## ReduceSumSquare - 13 ### Version - **name**: [ReduceSumSquare (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#ReduceSumSquare) - **domain**: `main` - **since_version**: `13` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 13**. ### Summary Computes the sum square of the input tensor's elements along the provided axes. The resulting tensor has the same rank as the input if `keepdims` equals 1. If `keepdims` equals 0, then the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are valid. Reduction over an empty set of values yields 0. The above behavior is similar to numpy, with the exception that numpy defaults `keepdims` to `False` instead of `True`. ### Attributes * **axes - INTS** : A list of integers, along which to reduce. The default is to reduce over all the dimensions of the input tensor. Accepted range is [-r, r-1] where r = rank(data). * **keepdims - INT** (default is `'1'`): Keep the reduced dimension or not, default 1 means keep reduced dimension. ### Inputs - **data** (heterogeneous) - **T**: An input tensor. ### Outputs - **reduced** (heterogeneous) - **T**: Reduced output tensor. ### Type Constraints * **T** in ( `tensor(bfloat16)`, `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int32)`, `tensor(int64)`, `tensor(uint32)`, `tensor(uint64)` ): Constrain input and output types to numeric tensors. ```{toctree} text_diff_ReduceSumSquare_11_18 text_diff_ReduceSumSquare_11_13 ``` (l-onnx-op-reducesumsquare-11)= ## ReduceSumSquare - 11 ### Version - **name**: [ReduceSumSquare (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#ReduceSumSquare) - **domain**: `main` - **since_version**: `11` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 11**. ### Summary Computes the sum square of the input tensor's element along the provided axes. The resulting tensor has the same rank as the input if keepdims equals 1. If keepdims equal 0, then the resulted tensor have the reduced dimension pruned. The above behavior is similar to numpy, with the exception that numpy defaults keepdims to False instead of True. ### Attributes * **axes - INTS** : A list of integers, along which to reduce. The default is to reduce over all the dimensions of the input tensor. Accepted range is [-r, r-1] where r = rank(data). * **keepdims - INT** (default is `'1'`): Keep the reduced dimension or not, default 1 means keep reduced dimension. ### Inputs - **data** (heterogeneous) - **T**: An input tensor. ### Outputs - **reduced** (heterogeneous) - **T**: Reduced output tensor. ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int32)`, `tensor(int64)`, `tensor(uint32)`, `tensor(uint64)` ): Constrain input and output types to high-precision numeric tensors. ```{toctree} text_diff_ReduceSumSquare_1_18 text_diff_ReduceSumSquare_1_13 text_diff_ReduceSumSquare_1_11 ``` (l-onnx-op-reducesumsquare-1)= ## ReduceSumSquare - 1 ### Version - **name**: [ReduceSumSquare (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#ReduceSumSquare) - **domain**: `main` - **since_version**: `1` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 1**. ### Summary Computes the sum square of the input tensor's element along the provided axes. The resulting tensor has the same rank as the input if keepdims equals 1. If keepdims equal 0, then the resulted tensor have the reduced dimension pruned. Input tensors of rank zero are valid. Reduction over an empty set of values yields 0. The above behavior is similar to numpy, with the exception that numpy defaults keepdims to False instead of True. ### Attributes * **axes - INTS** : A list of integers, along which to reduce. The default is to reduce over all the dimensions of the input tensor. * **keepdims - INT** (default is `'1'`): Keep the reduced dimension or not, default 1 means keep reduced dimension. ### Inputs - **data** (heterogeneous) - **T**: An input tensor. ### Outputs - **reduced** (heterogeneous) - **T**: Reduced output tensor. ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(float16)`, `tensor(int32)`, `tensor(int64)`, `tensor(uint32)`, `tensor(uint64)` ): Constrain input and output types to high-precision numeric tensors.