Reduction operations specification refactoring (#5612)
* Reduction operations specification refactoring * Change axes input element type to any supported integer * Address review comments related to wording
This commit is contained in:
parent
12f2bb72da
commit
6b66f8f47f
@ -4,47 +4,48 @@
|
||||
|
||||
**Category**: *Reduction*
|
||||
|
||||
**Short description**: *ReduceL1* operation performs reduction with finding the L1 norm (sum of absolute values) of the 1st input tensor in slices specified by the 2nd input.
|
||||
**Short description**: *ReduceL1* operation performs the reduction with finding the L1 norm (sum of absolute values) on a given input `data` along dimensions specified by `axes` input.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
*ReduceL1* operation performs the reduction with finding the L1 norm (sum of absolute values) on a given input `data` along dimensions specified by `axes` input.
|
||||
Each element in the output is calculated as follows:
|
||||
|
||||
`output[i0, i1, ..., iN] = L1[j0, ..., jN](x[j0, ..., jN]))`
|
||||
|
||||
where indices i0, ..., iN run through all valid indices for input `data`, and finding the L1 norm `L1[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
|
||||
Particular cases:
|
||||
|
||||
1. If `axes` is an empty list, *ReduceL1* corresponds to the identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *keep_dims*
|
||||
|
||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
||||
* **Range of values**: true or false
|
||||
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||
* **Range of values**: `true` or `false`
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: false
|
||||
* **Default value**: `false`
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**
|
||||
|
||||
* **1**: Input tensor x of type *T1*. **Required.**
|
||||
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||
|
||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r - 1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||
|
||||
**Outputs**
|
||||
|
||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
||||
* **1**: The result of *ReduceL1* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T1*: numeric type.
|
||||
* *T2*: `int64` or `int32`.
|
||||
* *T*: any supported numeric type.
|
||||
* *T_IND*: any supported integer type.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
Each element in the output is the result of reduction with finding a Lp norm operation along dimensions specified by the 2nd input:
|
||||
|
||||
`output[i0, i1, ..., iN] = L1[j0,..., jN](x[j0, ..., jN]))`
|
||||
|
||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the Lp norm `L1[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
||||
|
||||
Corner cases:
|
||||
|
||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction scalar value is calculated for entire input tensor.
|
||||
|
||||
**Example**
|
||||
**Examples**
|
||||
|
||||
```xml
|
||||
<layer id="1" type="ReduceL1" ...>
|
||||
|
@ -4,47 +4,48 @@
|
||||
|
||||
**Category**: *Reduction*
|
||||
|
||||
**Short description**: *ReduceL2* operation performs reduction with finding the L2 norm (square root of sum of squares) of the 1st input tensor in slices specified by the 2nd input.
|
||||
**Short description**: *ReduceL2* operation performs the reduction with finding the L2 norm (square root of sum of squares) on a given input `data` along dimensions specified by `axes` input.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
*ReduceL2* operation performs the reduction with finding the L2 norm (square root of sum of squares) on a given input `data` along dimensions specified by `axes` input.
|
||||
Each element in the output is calculated as follows:
|
||||
|
||||
`output[i0, i1, ..., iN] = L2[j0, ..., jN](x[j0, ..., jN]))`
|
||||
|
||||
where indices i0, ..., iN run through all valid indices for input `data`, and finding the L2 norm `L2[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
|
||||
Particular cases:
|
||||
|
||||
1. If `axes` is an empty list, *ReduceL2* corresponds to the identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *keep_dims*
|
||||
|
||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
||||
* **Range of values**: true or false
|
||||
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||
* **Range of values**: `true` or `false`
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: false
|
||||
* **Default value**: `false`
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**
|
||||
|
||||
* **1**: Input tensor x of type *T1*. **Required.**
|
||||
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||
|
||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r - 1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||
|
||||
**Outputs**
|
||||
|
||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
||||
* **1**: The result of *ReduceL2* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T1*: floating point type.
|
||||
* *T2*: `int64` or `int32`.
|
||||
* *T*: any supported numeric type.
|
||||
* *T_IND*: any supported integer type.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
Each element in the output is the result of reduction with finding a Lp norm operation along dimensions specified by the 2nd input:
|
||||
|
||||
`output[i0, i1, ..., iN] = L2[j0,..., jN](x[j0, ..., jN]))`
|
||||
|
||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the Lp norm `L2[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
||||
|
||||
Corner cases:
|
||||
|
||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction scalar value is calculated for entire input tensor.
|
||||
|
||||
**Example**
|
||||
**Examples**
|
||||
|
||||
```xml
|
||||
<layer id="1" type="ReduceL2" ...>
|
||||
|
@ -4,46 +4,48 @@
|
||||
|
||||
**Category**: *Reduction*
|
||||
|
||||
**Short description**: *ReduceLogicalAnd* operation performs reduction with *logical and* operation of the 1st input tensor in slices specified by the 2nd input.
|
||||
**Short description**: *ReduceLogicalAnd* operation performs the reduction with *logical and* operation on a given input `data` along dimensions specified by `axes` input.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
*ReduceLogicalAnd* operation performs the reduction with *logical and* operation on a given input `data` along dimensions specified by `axes` input.
|
||||
Each element in the output is calculated as follows:
|
||||
|
||||
output[i0, i1, ..., iN] = and[j0,c..., jN](x[j0, ..., jN]))
|
||||
|
||||
where indices i0, ..., iN run through all valid indices for input `data`, and *logical and* operation `and[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
|
||||
Particular cases:
|
||||
|
||||
1. If `axes` is an empty list, *ReduceLogicalAnd* corresponds to the identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *keep_dims*
|
||||
|
||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
||||
* **Range of values**: true or false
|
||||
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||
* **Range of values**: `true` or `false`
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: false
|
||||
* **Default value**: `false`
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**
|
||||
|
||||
* **1**: Input tensor x of type *T1*. **Required.**
|
||||
* **1**: `data` - A tensor of type *T_BOOL* and arbitrary shape. **Required.**
|
||||
|
||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||
|
||||
**Outputs**
|
||||
|
||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
||||
* **1**: The result of *ReduceLogicalAnd* function applied to `data` input tensor. A tensor of type *T_BOOL* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T1*: any supported numeric type.
|
||||
* *T_IND*: `int64` or `int32`.
|
||||
* *T_BOOL*: `boolean`.
|
||||
* *T_IND*: any supported integer type.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
Each element in the output is the result of reduction with *logical and* operation along dimensions specified by the 2nd input:
|
||||
|
||||
output[i0, i1, ..., iN] = and[j0,..., jN](x[j0, ..., jN]))
|
||||
|
||||
Where indices i0, ..., iN run through all valid indices for the 1st input and *logical and* operation `and[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
||||
Corner cases:
|
||||
|
||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
||||
|
||||
**Example**
|
||||
**Examples**
|
||||
|
||||
```xml
|
||||
<layer id="1" type="ReduceLogicalAnd" ...>
|
||||
|
@ -4,46 +4,48 @@
|
||||
|
||||
**Category**: *Reduction*
|
||||
|
||||
**Short description**: *ReduceLogicalOr* operation performs reduction with *logical or* operation of the 1st input tensor in slices specified by the 2nd input.
|
||||
**Short description**: *ReduceLogicalOr* operation performs the reduction with *logical or* operation on a given input `data` along dimensions specified by `axes` input.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
*ReduceLogicalOr* operation performs the reduction with *logical or* operation on a given input `data` along dimensions specified by `axes` input.
|
||||
Each element in the output is calculated as follows:
|
||||
|
||||
output[i0, i1, ..., iN] = or[j0, ..., jN](x[j0, ..., jN]))
|
||||
|
||||
where indices i0, ..., iN run through all valid indices for input `data`, and *logical or* operation `or[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
|
||||
Particular cases:
|
||||
|
||||
1. If `axes` is an empty list, *ReduceLogicalOr* corresponds to the identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *keep_dims*
|
||||
|
||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
||||
* **Range of values**: true or false
|
||||
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||
* **Range of values**: `true` or `false`
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: false
|
||||
* **Default value**: `false`
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**
|
||||
|
||||
* **1**: Input tensor x of type *T1*. **Required.**
|
||||
* **1**: `data` - A tensor of type *T_BOOL* and arbitrary shape. **Required.**
|
||||
|
||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||
|
||||
**Outputs**
|
||||
|
||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
||||
* **1**: The result of *ReduceLogicalOr* function applied to `data` input tensor. A tensor of type *T_BOOL* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T1*: any supported numeric type.
|
||||
* *T_IND*: `int64` or `int32`.
|
||||
* *T_BOOL*: `boolean`.
|
||||
* *T_IND*: any supported integer type.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
Each element in the output is the result of reduction with *logical or* operation along dimensions specified by the 2nd input:
|
||||
|
||||
output[i0, i1, ..., iN] = or[j0,..., jN](x[j0, ..., jN]**2))
|
||||
|
||||
Where indices i0, ..., iN run through all valid indices for the 1st input and *logical or* operation `or[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
||||
Corner cases:
|
||||
|
||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
||||
|
||||
**Example**
|
||||
**Examples**
|
||||
|
||||
```xml
|
||||
<layer id="1" type="ReduceLogicalOr" ...>
|
||||
|
@ -4,46 +4,48 @@
|
||||
|
||||
**Category**: *Reduction*
|
||||
|
||||
**Short description**: *ReduceMax* operation performs reduction with finding the maximum value of the 1st input tensor in slices specified by the 2nd input.
|
||||
**Short description**: *ReduceMax* operation performs the reduction with finding the maximum value on a given input `data` along dimensions specified by `axes` input.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
*ReduceMax* operation performs the reduction with finding the maximum value on a given input `data` along dimensions specified by `axes` input.
|
||||
Each element in the output is calculated as follows:
|
||||
|
||||
output[i0, i1, ..., iN] = max[j0, ..., jN](x[j0, ..., jN]))
|
||||
|
||||
where indices i0, ..., iN run through all valid indices for input `data`, and finding the maximum value `max[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
|
||||
Particular cases:
|
||||
|
||||
1. If `axes` is an empty list, *ReduceMax* corresponds to the identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *keep_dims*
|
||||
|
||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
||||
* **Range of values**: true or false
|
||||
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||
* **Range of values**: `true` or `false`
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: false
|
||||
* **Default value**: `false`
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**
|
||||
|
||||
* **1**: Input tensor x of type *T1*. **Required.**
|
||||
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||
|
||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||
|
||||
**Outputs**
|
||||
|
||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
||||
* **1**: The result of *ReduceMax* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||
|
||||
** Types **
|
||||
**Types**
|
||||
|
||||
* *T1*: any supported numeric type.
|
||||
* *T_IND*: `int64` or `int32`.
|
||||
* *T*: any supported numeric type.
|
||||
* *T_IND*: any supported integer type.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
Each element in the output is the result of reduction with finding a maximum operation along dimensions specified by the 2nd input:
|
||||
|
||||
output[i0, i1, ..., iN] = max[j0,..., jN](x[j0, ..., jN]))
|
||||
|
||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the maximum value `max[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
||||
Corner cases:
|
||||
|
||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
||||
|
||||
**Example**
|
||||
**Examples**
|
||||
|
||||
```xml
|
||||
<layer id="1" type="ReduceMax" ...>
|
||||
|
@ -4,45 +4,48 @@
|
||||
|
||||
**Category**: *Reduction*
|
||||
|
||||
**Short description**: *ReduceMean* operation performs reduction with finding the arithmetic mean of the 1st input tensor in slices specified by the 2nd input.
|
||||
**Short description**: *ReduceMean* operation performs the reduction with finding the arithmetic mean on a given input `data` along dimensions specified by `axes` input.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
*ReduceMean* operation performs the reduction with finding the arithmetic mean on a given input `data` along dimensions specified by `axes` input.
|
||||
Each element in the output is calculated as follows:
|
||||
|
||||
output[i0, i1, ..., iN] = mean[j0, ..., jN](x[j0, ..., jN]))
|
||||
|
||||
where indices i0, ..., iN run through all valid indices for input `data`, and finding the arithmetic mean `mean[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
|
||||
Particular cases:
|
||||
|
||||
1. If `axes` is an empty list, *ReduceMean* corresponds to the identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *keep_dims*
|
||||
|
||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
||||
* **Range of values**: true or false
|
||||
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||
* **Range of values**: `true` or `false`
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: false
|
||||
* **Default value**: `false`
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**
|
||||
|
||||
* **1**: Input tensor x of type *T1*. **Required.**
|
||||
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||
|
||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||
|
||||
**Outputs**
|
||||
|
||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
||||
* **1**: The result of *ReduceMean* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T1*: any supported numeric type.
|
||||
* *T_IND*: `int64` or `int32`.
|
||||
* *T*: any supported numeric type.
|
||||
* *T_IND*: any supported integer type.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
Each element in the output is the result of arithmetic mean reduction operation along dimensions specified by the 2nd input:
|
||||
|
||||
output[i0, i1, ..., iN] = mean[j0,..., jN](x[j0, ..., jN]))
|
||||
|
||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the arithmetic mean `mean[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation. Corner cases:
|
||||
|
||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
||||
|
||||
**Example**
|
||||
**Examples**
|
||||
|
||||
```xml
|
||||
<layer id="1" type="ReduceMean" ...>
|
||||
|
@ -4,46 +4,48 @@
|
||||
|
||||
**Category**: *Reduction*
|
||||
|
||||
**Short description**: *ReduceMin* operation performs reduction with finding the minimum value of the 1st input tensor in slices specified by the 2nd input.
|
||||
**Short description**: *ReduceMin* operation performs the reduction with finding the minimum value on a given input `data` along dimensions specified by `axes` input.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
*ReduceMin* operation performs the reduction with finding the minimum value on a given input `data` along dimensions specified by `axes` input.
|
||||
Each element in the output is calculated as follows:
|
||||
|
||||
output[i0, i1, ..., iN] = min[j0, ..., jN](x[j0, ..., jN]))
|
||||
|
||||
where indices i0, ..., iN run through all valid indices for input `data`, and finding the minimum value `min[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
|
||||
Particular cases:
|
||||
|
||||
1. If `axes` is an empty list, *ReduceMin* corresponds to the identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *keep_dims*
|
||||
|
||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
||||
* **Range of values**: true or false
|
||||
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||
* **Range of values**: `true` or `false`
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: false
|
||||
* **Default value**: `false`
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**
|
||||
|
||||
* **1**: Input tensor x of type *T1*. **Required.**
|
||||
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||
|
||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||
|
||||
**Outputs**
|
||||
|
||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
||||
* **1**: The result of *ReduceMin* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T1*: any supported numeric type.
|
||||
* *T_IND*: `int64` or `int32`.
|
||||
* *T*: any supported numeric type.
|
||||
* *T_IND*: any supported integer type.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
Each element in the output is the result of reduction with finding a minimum operation along dimensions specified by the 2nd input:
|
||||
|
||||
output[i0, i1, ..., iN] = min[j0,..., jN](x[j0, ..., jN]))
|
||||
|
||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the minimum value `min[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
||||
Corner cases:
|
||||
|
||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
||||
|
||||
**Example**
|
||||
**Examples**
|
||||
|
||||
```xml
|
||||
<layer id="1" type="ReduceMin" ...>
|
||||
|
@ -4,46 +4,48 @@
|
||||
|
||||
**Category**: *Reduction*
|
||||
|
||||
**Short description**: *ReduceProd* operation performs reduction with multiplication of the 1st input tensor in slices specified by the 2nd input.
|
||||
**Short description**: *ReduceProd* operation performs the reduction with multiplication on a given input `data` along dimensions specified by `axes` input.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
*ReduceProd* operation performs the reduction with multiplication on a given input `data` along dimensions specified by `axes` input.
|
||||
Each element in the output is calculated as follows:
|
||||
|
||||
output[i0, i1, ..., iN] = prod[j0, ..., jN](x[j0, ..., jN]))
|
||||
|
||||
where indices i0, ..., iN run through all valid indices for input `data`, and multiplication `prod[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
|
||||
Particular cases:
|
||||
|
||||
1. If `axes` is an empty list, *ReduceProd* corresponds to the identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *keep_dims*
|
||||
|
||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
||||
* **Range of values**: true or false
|
||||
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||
* **Range of values**: `true` or `false`
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: false
|
||||
* **Default value**: `false`
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**
|
||||
|
||||
* **1**: Input tensor x of type *T1*. **Required.**
|
||||
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||
|
||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||
|
||||
**Outputs**
|
||||
|
||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
||||
* **1**: The result of *ReduceProd* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T1*: any supported numeric type.
|
||||
* *T_IND*: `int64` or `int32`.
|
||||
* *T*: any supported numeric type.
|
||||
* *T_IND*: any supported integer type.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
Each element in the output is the result of reduction with multiplication operation along dimensions specified by the 2nd input:
|
||||
|
||||
output[i0, i1, ..., iN] = prod[j0,..., jN](x[j0, ..., jN]))
|
||||
|
||||
Where indices i0, ..., iN run through all valid indices for the 1st input and multiplication `prod[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
||||
Corner cases:
|
||||
|
||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
||||
|
||||
**Example**
|
||||
**Examples**
|
||||
|
||||
```xml
|
||||
<layer id="1" type="ReduceProd" ...>
|
||||
|
@ -4,46 +4,46 @@
|
||||
|
||||
**Category**: *Reduction*
|
||||
|
||||
**Short description**: *ReduceSum* operation performs reduction with addition, on a given input `data`, along dimensions specified by `axes` input.
|
||||
**Short description**: *ReduceSum* operation performs the reduction with addition on a given input `data` along dimensions specified by `axes` input.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
*ReduceSum* operation performs reduction with addition, on a given input `data`, along dimensions specified by `axes` additional input.
|
||||
*ReduceSum* operation performs the reduction with addition on a given input `data` along dimensions specified by `axes` input.
|
||||
Each element in the output is calculated as follows:
|
||||
|
||||
output[i0, i1, ..., iN] = sum[j0,..., jN](x[j0, ..., jN]))
|
||||
output[i0, i1, ..., iN] = sum[j0, ..., jN](x[j0, ..., jN]))
|
||||
|
||||
where indices i0, ..., iN run through all valid indices for input `data` and summation `sum[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
where indices i0, ..., iN run through all valid indices for input `data`, and summation `sum[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||
|
||||
Particular cases:
|
||||
|
||||
1. If `axes` is an empty list, then *ReduceSum* corresponds to identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for entire input tensor.
|
||||
1. If `axes` is an empty list, *ReduceSum* corresponds to the identity operation.
|
||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *keep_dims*
|
||||
|
||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
||||
* **Range of values**: true or false
|
||||
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||
* **Range of values**: `true` or `false`
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: false
|
||||
* **Default value**: `false`
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**
|
||||
|
||||
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]` where `r` is the rank of `data` input tensor. **Required.**
|
||||
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||
|
||||
**Outputs**
|
||||
|
||||
* **1**: A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`, otherwise the `i`-th dimension is removed from the output.
|
||||
* **1**: The result of *ReduceSum* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T*: any supported numeric type.
|
||||
* *T_IND*: `int64` or `int32`.
|
||||
* *T_IND*: any supported integer type.
|
||||
|
||||
**Examples**
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user