Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
eef72406cc
@ -36,7 +36,7 @@ clamp( x_{i} )=\min\big( \max\left( x_{i}, min\_value \right), max\_value \big)
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ where α corresponds to *alpha* attribute.
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ exp(x) = e^{x}
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ Additionally, *Gelu* function may be approximated as follows:
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ For `tanh` approximation mode, *Gelu* function is represented as:
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
**Short description**: HSigmoid takes one input tensor and produces output tensor where the hard version of sigmoid function is applied to the tensor elementwise.
|
**Short description**: HSigmoid takes one input tensor and produces output tensor where the hard version of sigmoid function is applied to the tensor elementwise.
|
||||||
|
|
||||||
**Detailed description**: For each element from the input tensor calculates corresponding
|
**Detailed description**: For each element from the input tensor calculates corresponding
|
||||||
element in the output tensor with the following formula:
|
element in the output tensor with the following formula:
|
||||||
|
|
||||||
\f[
|
\f[
|
||||||
HSigmoid(x) = \frac{min(max(x + 3, 0), 6)}{6}
|
HSigmoid(x) = \frac{min(max(x + 3, 0), 6)}{6}
|
||||||
@ -44,4 +44,4 @@ The HSigmoid operation is introduced in the following [article](https://arxiv.or
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
**Short description**: HSwish takes one input tensor and produces output tensor where the hard version of swish function is applied to the tensor elementwise.
|
**Short description**: HSwish takes one input tensor and produces output tensor where the hard version of swish function is applied to the tensor elementwise.
|
||||||
|
|
||||||
**Detailed description**: For each element from the input tensor calculates corresponding
|
**Detailed description**: For each element from the input tensor calculates corresponding
|
||||||
element in the output tensor with the following formula:
|
element in the output tensor with the following formula:
|
||||||
|
|
||||||
\f[
|
\f[
|
||||||
HSwish(x) = x \frac{min(max(x + 3, 0), 6)}{6}
|
HSwish(x) = x \frac{min(max(x + 3, 0), 6)}{6}
|
||||||
@ -19,7 +19,7 @@ The HSwish operation is introduced in the following [article](https://arxiv.org/
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Multidimensional input tensor of type *T*. **Required**.
|
* **1**: Multidimensional input tensor of type *T*. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ LogSoftmax(x, axis) = t - Log(ReduceSum(Exp(t), axis))
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Input tensor *x* of type *T* with enough number of dimension to be compatible with *axis* attribute. Required.
|
* **1**: Input tensor *x* of type *T* with enough number of dimension to be compatible with *axis* attribute. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ Mish(x) = x\cdot\tanh\big(SoftPlus(x)\big) = x\cdot\tanh\big(\ln(1+e^{x})\big)
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ PReLU(x) = \max(0, x) + \alpha\cdot\min(0, x)
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data`. A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: `data`. A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
* **2**: `slope`. A tensor of type *T* and rank greater or equal to 1. Tensor with negative slope values. **Required**.
|
* **2**: `slope`. A tensor of type *T* and rank greater or equal to 1. Tensor with negative slope values. **Required.**
|
||||||
* **Note**: Channels dimension corresponds to the second dimension of `data` input tensor. If `slope` input rank is 1 and its dimension is equal to the second dimension of `data` input, then per channel broadcast is applied. Otherwise `slope` input is broadcasted with numpy rules, description is available in [Broadcast Rules For Elementwise Operations](../broadcast_rules.md).
|
* **Note**: Channels dimension corresponds to the second dimension of `data` input tensor. If `slope` input rank is 1 and its dimension is equal to the second dimension of `data` input, then per channel broadcast is applied. Otherwise `slope` input is broadcasted with numpy rules, description is available in [Broadcast Rules For Elementwise Operations](../broadcast_rules.md).
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
@ -20,11 +20,11 @@ For each element from the input tensor calculates corresponding
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Multidimensional input tensor *x* of any supported numeric type. Required.
|
* **1**: Multidimensional input tensor *x* of any supported numeric type. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
* **1**: Result of ReLU function applied to the input tensor *x*. Tensor with shape and type matching the input tensor. Required.
|
* **1**: Result of ReLU function applied to the input tensor *x*. Tensor with shape and type matching the input tensor.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
@ -44,4 +44,4 @@ For each element from the input tensor calculates corresponding
|
|||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -20,7 +20,7 @@ sigmoid( x ) = \frac{1}{1+e^{-x}}
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Input tensor *x* of any floating point type. Required.
|
* **1**: Input tensor *x* of any floating point type. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ where \f$C\f$ is a size of tensor along *axis* dimension.
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Input tensor with enough number of dimension to be compatible with *axis* attribute. Required.
|
* **1**: Input tensor with enough number of dimension to be compatible with *axis* attribute. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
@ -41,4 +41,4 @@ where \f$C\f$ is a size of tensor along *axis* dimension.
|
|||||||
<input> ... </input>
|
<input> ... </input>
|
||||||
<output> ... </output>
|
<output> ... </output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -35,7 +35,7 @@ For example, if *T* is `fp32`, `threshold` should be `20` or if *T* is `fp16`, `
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@ where β corresponds to `beta` scalar input.
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `data`. A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: `data`. A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: `beta`. A non-negative scalar value of type *T*. Multiplication parameter for the sigmoid. Default value 1.0 is used. **Optional**.
|
* **2**: `beta`. A non-negative scalar value of type *T*. Multiplication parameter for the sigmoid. Default value 1.0 is used. **Optional.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ o_{i} = a_{i} % b_{i}
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. Required.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
* **2**: A tensor of type *T* and arbitrary shape. Required.
|
* **2**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ o_{i} = max(a_{i}, b_{i})
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. Required.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
* **2**: A tensor of type *T* and arbitrary shape. Required.
|
* **2**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ o_{i} = min(a_{i}, b_{i})
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. Required.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
* **2**: A tensor of type *T* and arbitrary shape. Required.
|
* **2**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ o_{i} = a_{i} % b_{i}
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. Required.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
* **2**: A tensor of type *T* and arbitrary shape. Required.
|
* **2**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ o_{i} = {a_{i} ^ b_{i}}
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. Required.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
* **2**: A tensor of type *T* and arbitrary shape. Required.
|
* **2**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
**Versioned name**: *Round-5*
|
**Versioned name**: *Round-5*
|
||||||
|
|
||||||
**Category**: Arithmetic unary operation
|
**Category**: Arithmetic unary operation
|
||||||
|
|
||||||
**Short description**: *Round* performs element-wise round operation with given tensor.
|
**Short description**: *Round* performs element-wise round operation with given tensor.
|
||||||
|
|
||||||
**Detailed description**: Operation takes one input tensor and rounds the values, element-wise, meaning it finds the nearest integer for each value. In case of halves, the rule is to round them to the nearest even integer if `mode` attribute is `half_to_even` or rounding in such a way that the result heads away from zero if `mode` attribute is `half_away_from_zero`.
|
**Detailed description**: Operation takes one input tensor and rounds the values, element-wise, meaning it finds the nearest integer for each value. In case of halves, the rule is to round them to the nearest even integer if `mode` attribute is `half_to_even` or rounding in such a way that the result heads away from zero if `mode` attribute is `half_away_from_zero`.
|
||||||
|
|
||||||
Input = [-4.5, -1.9, -1.5, 0.5, 0.9, 1.5, 2.3, 2.5]
|
Input = [-4.5, -1.9, -1.5, 0.5, 0.9, 1.5, 2.3, 2.5]
|
||||||
|
|
||||||
round(Input, mode = `half_to_even`) = [-4.0, -2.0, -2.0, 0.0, 1.0, 2.0, 2.0, 2.0]
|
round(Input, mode = `half_to_even`) = [-4.0, -2.0, -2.0, 0.0, 1.0, 2.0, 2.0, 2.0]
|
||||||
|
|
||||||
round(Input, mode = `half_away_from_zero`) = [-5.0, -2.0, -2.0, 1.0, 1.0, 2.0, 2.0, 3.0]
|
round(Input, mode = `half_away_from_zero`) = [-5.0, -2.0, -2.0, 1.0, 1.0, 2.0, 2.0, 3.0]
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
|
@ -27,8 +27,8 @@ o_{i} = (a_{i} - b_{i})^2
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. Required.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
* **2**: A tensor of type *T* and arbitrary shape. Required.
|
* **2**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ For example, if the first input tensor is `[[3, 50], [10, -1]]` and the second i
|
|||||||
* **Range of values**: "i64" or "i32"
|
* **Range of values**: "i64" or "i32"
|
||||||
* **Type**: string
|
* **Type**: string
|
||||||
* **Default value**: "i64"
|
* **Default value**: "i64"
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *with_right_bound*
|
* *with_right_bound*
|
||||||
|
|
||||||
@ -27,13 +27,13 @@ For example, if the first input tensor is `[[3, 50], [10, -1]]` and the second i
|
|||||||
* true - bucket includes the right interval edge
|
* true - bucket includes the right interval edge
|
||||||
* false - bucket includes the left interval edge
|
* false - bucket includes the left interval edge
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: true
|
* **Default value**: true
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: N-D tensor of *T* type with elements for the bucketization. Required.
|
* **1**: N-D tensor of *T* type with elements for the bucketization. **Required.**
|
||||||
* **2**: 1-D tensor of *T_BOUNDARIES* type with sorted unique boundaries for buckets. Required.
|
* **2**: 1-D tensor of *T_BOUNDARIES* type with sorted unique boundaries for buckets. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
* **Range of values**: `i64` or `i32`
|
* **Range of values**: `i64` or `i32`
|
||||||
* **Type**: string
|
* **Type**: string
|
||||||
* **Default value**: "i64"
|
* **Default value**: "i64"
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
@ -57,4 +57,4 @@
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -53,7 +53,7 @@ Computation algorithm for mode *xnor-popcount*:
|
|||||||
* *xnor-popcount*
|
* *xnor-popcount*
|
||||||
* **Type**: `string`
|
* **Type**: `string`
|
||||||
* **Required**: *yes*
|
* **Required**: *yes*
|
||||||
* **Note**: value `0` in inputs is interpreted as `-1`, value `1` as `1`
|
* **Note**: value `0` in inputs is interpreted as `-1`, value `1` as `1`
|
||||||
|
|
||||||
* *pad_value*
|
* *pad_value*
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ Computation algorithm for mode *xnor-popcount*:
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Input tensor of type *T1* and rank 4. Layout is `[N, C_IN, Y, X]` (number of batches, number of channels, spatial axes Y, X). Required.
|
* **1**: Input tensor of type *T1* and rank 4. Layout is `[N, C_IN, Y, X]` (number of batches, number of channels, spatial axes Y, X). **Required.**
|
||||||
* **2**: Kernel tensor of type *T2* and rank 4. Layout is `[C_OUT, C_IN, Y, X]` (number of output channels, number of input channels, spatial axes Y, X). Required.
|
* **2**: Kernel tensor of type *T2* and rank 4. Layout is `[C_OUT, C_IN, Y, X]` (number of output channels, number of input channels, spatial axes Y, X). **Required.**
|
||||||
* **Note**: Interpretation of tensor values is defined by *mode* attribute.
|
* **Note**: Interpretation of tensor values is defined by *mode* attribute.
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
@ -90,11 +90,11 @@ else:
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Input tensor of type *T1* and rank 3, 4 or 5. Layout is `[N, C_INPUT, Z, Y, X]` (number of batches, number of input channels, spatial axes Z, Y, X). *Required*.
|
* **1**: Input tensor of type *T1* and rank 3, 4 or 5. Layout is `[N, C_INPUT, Z, Y, X]` (number of batches, number of input channels, spatial axes Z, Y, X). **Required.**
|
||||||
|
|
||||||
* **2**: Convolution kernel tensor of type *T1* and rank 3, 4 or 5. Layout is `[C_INPUT, C_OUTPUT, Z, Y, X]` (number of input channels, number of output channels, spatial axes Z, Y, X). Spatial size of the kernel is derived from the shape of this input and aren't specified by any attribute. *Required*.
|
* **2**: Convolution kernel tensor of type *T1* and rank 3, 4 or 5. Layout is `[C_INPUT, C_OUTPUT, Z, Y, X]` (number of input channels, number of output channels, spatial axes Z, Y, X). Spatial size of the kernel is derived from the shape of this input and aren't specified by any attribute. **Required.**
|
||||||
|
|
||||||
* **3**: `output_shape` is 1D tensor of type *T2* that specifies spatial shape of the output. If specified, *padding amount* is deduced from relation of input and output spatial shapes according to formulas in the description. If not specified, *output shape* is calculated based on the `pads_begin` and `pads_end` or completely according to `auto_pad`. *Optional*.
|
* **3**: `output_shape` is 1D tensor of type *T2* that specifies spatial shape of the output. If specified, *padding amount* is deduced from relation of input and output spatial shapes according to formulas in the description. If not specified, *output shape* is calculated based on the `pads_begin` and `pads_end` or completely according to `auto_pad`. **Optional.**
|
||||||
* **Note**: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:
|
* **Note**: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:
|
||||||
* 1D convolution (input tensors rank 3) means that there is only one spatial axis X,
|
* 1D convolution (input tensors rank 3) means that there is only one spatial axis X,
|
||||||
* 2D convolution (input tensors rank 4) means that there are two spatial axes Y, X,
|
* 2D convolution (input tensors rank 4) means that there are two spatial axes Y, X,
|
||||||
|
@ -77,8 +77,8 @@ The receptive field in each layer is calculated using the formulas:
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Input tensor of type *T* and rank 3, 4 or 5. Layout is `[N, C_IN, Z, Y, X]` (number of batches, number of channels, spatial axes Z, Y, X). Required.
|
* **1**: Input tensor of type *T* and rank 3, 4 or 5. Layout is `[N, C_IN, Z, Y, X]` (number of batches, number of channels, spatial axes Z, Y, X). **Required.**
|
||||||
* **2**: Kernel tensor of type *T* and rank 3, 4 or 5. Layout is `[C_OUT, C_IN, Z, Y, X]` (number of output channels, number of input channels, spatial axes Z, Y, X). Required.
|
* **2**: Kernel tensor of type *T* and rank 3, 4 or 5. Layout is `[C_OUT, C_IN, Z, Y, X]` (number of output channels, number of input channels, spatial axes Z, Y, X). **Required.**
|
||||||
* **Note**: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:
|
* **Note**: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:
|
||||||
* 1D convolution (input tensors rank 3) means that there is only one spatial axis X
|
* 1D convolution (input tensors rank 3) means that there is only one spatial axis X
|
||||||
* 2D convolution (input tensors rank 4) means that there are two spatial axes Y, X
|
* 2D convolution (input tensors rank 4) means that there are two spatial axes Y, X
|
||||||
|
@ -91,11 +91,11 @@ Where
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Input tensor of type *T* and rank 4. Layout is `NCYX` (number of batches, number of channels, spatial axes Y and X). Required.
|
* **1**: Input tensor of type *T* and rank 4. Layout is `NCYX` (number of batches, number of channels, spatial axes Y and X). **Required.**
|
||||||
|
|
||||||
* **2**: Offsets tensor of type *T* and rank 4. Layout is `NCYX` (number of batches, *deformable_group* \* kernel_Y \* kernel_X \* 2, spatial axes Y and X). Required.
|
* **2**: Offsets tensor of type *T* and rank 4. Layout is `NCYX` (number of batches, *deformable_group* \* kernel_Y \* kernel_X \* 2, spatial axes Y and X). **Required.**
|
||||||
|
|
||||||
* **3**: Kernel tensor of type *T* and rank 4. Layout is `OIYX` (number of output channels, number of input channels, spatial axes Y and X). Required.
|
* **3**: Kernel tensor of type *T* and rank 4. Layout is `OIYX` (number of output channels, number of input channels, spatial axes Y and X). **Required.**
|
||||||
|
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
@ -62,11 +62,11 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Input tensor of type `T1` and rank 3, 4 or 5. Layout is `[N, GROUPS * C_IN, Z, Y, X]` (number of batches, number of channels, spatial axes Z, Y, X). Required.
|
* **1**: Input tensor of type `T1` and rank 3, 4 or 5. Layout is `[N, GROUPS * C_IN, Z, Y, X]` (number of batches, number of channels, spatial axes Z, Y, X). **Required.**
|
||||||
|
|
||||||
* **2**: Kernel tensor of type `T1` and rank 4, 5 or 6. Layout is `[GROUPS, C_IN, C_OUT, X, Y, Z]` (number of groups, number of input channels, number of output channels, spatial axes X, Y, Z). Required.
|
* **2**: Kernel tensor of type `T1` and rank 4, 5 or 6. Layout is `[GROUPS, C_IN, C_OUT, X, Y, Z]` (number of groups, number of input channels, number of output channels, spatial axes X, Y, Z). **Required.**
|
||||||
|
|
||||||
* **3**: Output shape tensor of type `T2` and rank 1. It specifies spatial shape of the output. Optional.
|
* **3**: Output shape tensor of type `T2` and rank 1. It specifies spatial shape of the output. **Optional.**
|
||||||
* **Note** Number of groups is derived from the shape of the kernel and not specified by any attribute.
|
* **Note** Number of groups is derived from the shape of the kernel and not specified by any attribute.
|
||||||
* **Note**: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:
|
* **Note**: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:
|
||||||
* 1D convolution (input tensors rank 3) means that there is only one spatial axis X
|
* 1D convolution (input tensors rank 3) means that there is only one spatial axis X
|
||||||
|
@ -55,7 +55,7 @@ Neural Networks](https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Input tensor of type *T* and rank 3, 4 or 5. Layout is `[N, GROUPS * C_IN, Z, Y, X]` (number of batches, number of channels, spatial axes Z, Y, X). Required.
|
* **1**: Input tensor of type *T* and rank 3, 4 or 5. Layout is `[N, GROUPS * C_IN, Z, Y, X]` (number of batches, number of channels, spatial axes Z, Y, X). **Required.**
|
||||||
* **2**: Convolution kernel tensor of type *T* and rank 4, 5 or 6. Layout is `[GROUPS, C_OUT, C_IN, Z, Y, X]` (number of groups, number of output channels, number of input channels, spatial axes Z, Y, X),
|
* **2**: Convolution kernel tensor of type *T* and rank 4, 5 or 6. Layout is `[GROUPS, C_OUT, C_IN, Z, Y, X]` (number of groups, number of output channels, number of input channels, spatial axes Z, Y, X),
|
||||||
* **Note** Number of groups is derived from the shape of the kernel and not specified by any attribute.
|
* **Note** Number of groups is derived from the shape of the kernel and not specified by any attribute.
|
||||||
* **Note**: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:
|
* **Note**: Type of the convolution (1D, 2D or 3D) is derived from the rank of the input tensors and not specified by any attribute:
|
||||||
|
@ -81,12 +81,12 @@ This operation is compatible with [MXNet DeformablePSROIPooling](https://mxnet.a
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 4D input tensor of type *T* and shape `[N_in, C_in, H_in, W_in]` with position sensitive score maps. Required.
|
* **1**: 4D input tensor of type *T* and shape `[N_in, C_in, H_in, W_in]` with position sensitive score maps. **Required.**
|
||||||
|
|
||||||
* **2**: 2D input tensor of type *T* and shape `[NUM_ROIS, 5]`. It contains a list of five element tuples describing a single ROI (region of interest): `[batch_id, x_1, y_1, x_2, y_2]`. Required.
|
* **2**: 2D input tensor of type *T* and shape `[NUM_ROIS, 5]`. It contains a list of five element tuples describing a single ROI (region of interest): `[batch_id, x_1, y_1, x_2, y_2]`. **Required.**
|
||||||
Batch indices must be in the range of `[0, N_in-1]`.
|
Batch indices must be in the range of `[0, N_in-1]`.
|
||||||
|
|
||||||
* **3**: 4D input tensor of type *T* and shape `[NUM_ROIS, 2*NUM_CLASSES, group_size, group_size]` with transformation values. It contains normalized `[0, 1]` offsets for each ROI bin left top corner coordinates. Channel dimension is multiplied by `2` because of encoding two `(x, y)` coordinates. Optional.
|
* **3**: 4D input tensor of type *T* and shape `[NUM_ROIS, 2*NUM_CLASSES, group_size, group_size]` with transformation values. It contains normalized `[0, 1]` offsets for each ROI bin left top corner coordinates. Channel dimension is multiplied by `2` because of encoding two `(x, y)` coordinates. **Optional.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
* **1**: 4D output tensor of type *T* shape `[NUM_ROIS, output_dim, group_size, group_size]` with ROIs score maps.
|
* **1**: 4D output tensor of type *T* shape `[NUM_ROIS, output_dim, group_size, group_size]` with ROIs score maps.
|
||||||
|
@ -133,12 +133,11 @@ At each feature map cell, *DetectionOutput* predicts the offsets relative to the
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: 2D input tensor with box logits with shape `[N, num_prior_boxes * num_loc_classes * 4]` and type *T*. `num_loc_classes` is equal to `num_classes` when `share_location` is 0 or it's equal to 1 otherwise. Required.
|
* **1**: 2D input tensor with box logits with shape `[N, num_prior_boxes * num_loc_classes * 4]` and type *T*. `num_loc_classes` is equal to `num_classes` when `share_location` is 0 or it's equal to 1 otherwise. **Required.**
|
||||||
* **2**: 2D input tensor with class predictions with shape `[N, num_prior_boxes * num_classes]` and type *T*. Required.
|
* **2**: 2D input tensor with class predictions with shape `[N, num_prior_boxes * num_classes]` and type *T*. **Required.**
|
||||||
* **3**: 3D input tensor with proposals with shape `[priors_batch_size, 1, num_prior_boxes * prior_box_size]` or `[priors_batch_size, 2, num_prior_boxes * prior_box_size]`. `priors_batch_size` is either 1 or `N`. Size of the second dimension depends on `variance_encoded_in_target`. If `variance_encoded_in_target` is equal to 0, the second dimension equals to 2 and variance values are provided for each boxes coordinates. If `variance_encoded_in_target` is equal to 1, the second dimension equals to 1 and this tensor contains proposals boxes only. `prior_box_size` is equal to 4 when `normalized` is set to 1 or it's equal to 5 otherwise. Required.
|
* **3**: 3D input tensor with proposals with shape `[priors_batch_size, 1, num_prior_boxes * prior_box_size]` or `[priors_batch_size, 2, num_prior_boxes * prior_box_size]`. `priors_batch_size` is either 1 or `N`. Size of the second dimension depends on `variance_encoded_in_target`. If `variance_encoded_in_target` is equal to 0, the second dimension equals to 2 and variance values are provided for each boxes coordinates. If `variance_encoded_in_target` is equal to 1, the second dimension equals to 1 and this tensor contains proposals boxes only. `prior_box_size` is equal to 4 when `normalized` is set to 1 or it's equal to 5 otherwise. **Required.**
|
||||||
Required.
|
* **4**: 2D input tensor with additional class predictions information described in the [article](https://arxiv.org/pdf/1711.06897.pdf). Its shape must be equal to `[N, num_prior_boxes * 2]`. **Optional.**
|
||||||
* **4**: 2D input tensor with additional class predictions information described in the [article](https://arxiv.org/pdf/1711.06897.pdf). Its shape must be equal to `[N, num_prior_boxes * 2]`. Optional.
|
* **5**: 2D input tensor with additional box predictions information described in the [article](https://arxiv.org/pdf/1711.06897.pdf). Its shape must be equal to first input tensor shape. **Optional.**
|
||||||
* **5**: 2D input tensor with additional box predictions information described in the [article](https://arxiv.org/pdf/1711.06897.pdf). Its shape must be equal to first input tensor shape. Optional.
|
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
**Category**: Object detection
|
**Category**: Object detection
|
||||||
|
|
||||||
**Short description**: The *ExperimentalDetectronDetectionOutput* operation performs non-maximum suppression to generate
|
**Short description**: The *ExperimentalDetectronDetectionOutput* operation performs non-maximum suppression to generate
|
||||||
the detection output using information on location and score predictions.
|
the detection output using information on location and score predictions.
|
||||||
|
|
||||||
**Detailed description**: The operation performs the following steps:
|
**Detailed description**: The operation performs the following steps:
|
||||||
|
|
||||||
1. Applies deltas to boxes sizes [x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>] and takes coordinates of
|
1. Applies deltas to boxes sizes [x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>] and takes coordinates of
|
||||||
refined boxes according to the formulas:
|
refined boxes according to the formulas:
|
||||||
|
|
||||||
`x1_new = ctr_x + (dx - 0.5 * exp(min(d_log_w, max_delta_log_wh))) * box_w`
|
`x1_new = ctr_x + (dx - 0.5 * exp(min(d_log_w, max_delta_log_wh))) * box_w`
|
||||||
@ -19,7 +19,7 @@ refined boxes according to the formulas:
|
|||||||
`x1_new = ctr_x + (dx + 0.5 * exp(min(d_log_w, max_delta_log_wh))) * box_w - 1.0`
|
`x1_new = ctr_x + (dx + 0.5 * exp(min(d_log_w, max_delta_log_wh))) * box_w - 1.0`
|
||||||
|
|
||||||
`y1_new = ctr_y + (dy + 0.5 * exp(min(d_log_h, max_delta_log_wh))) * box_h - 1.0`
|
`y1_new = ctr_y + (dy + 0.5 * exp(min(d_log_h, max_delta_log_wh))) * box_h - 1.0`
|
||||||
|
|
||||||
* `box_w` and `box_h` are width and height of box, respectively:
|
* `box_w` and `box_h` are width and height of box, respectively:
|
||||||
|
|
||||||
`box_w = x1 - x0 + 1.0`
|
`box_w = x1 - x0 + 1.0`
|
||||||
@ -31,8 +31,8 @@ refined boxes according to the formulas:
|
|||||||
`ctr_x = x0 + 0.5f * box_w`
|
`ctr_x = x0 + 0.5f * box_w`
|
||||||
|
|
||||||
`ctr_y = y0 + 0.5f * box_h`
|
`ctr_y = y0 + 0.5f * box_h`
|
||||||
|
|
||||||
* `dx`, `dy`, `d_log_w` and `d_log_h` are deltas calculated according to the formulas below, and `deltas_tensor` is a
|
* `dx`, `dy`, `d_log_w` and `d_log_h` are deltas calculated according to the formulas below, and `deltas_tensor` is a
|
||||||
second input:
|
second input:
|
||||||
|
|
||||||
`dx = deltas_tensor[roi_idx, 4 * class_idx + 0] / deltas_weights[0]`
|
`dx = deltas_tensor[roi_idx, 4 * class_idx + 0] / deltas_weights[0]`
|
||||||
@ -46,17 +46,17 @@ second input:
|
|||||||
2. If *class_agnostic_box_regression* is `true` removes predictions for background classes.
|
2. If *class_agnostic_box_regression* is `true` removes predictions for background classes.
|
||||||
3. Clips boxes to the image.
|
3. Clips boxes to the image.
|
||||||
4. Applies *score_threshold* on detection scores.
|
4. Applies *score_threshold* on detection scores.
|
||||||
5. Applies non-maximum suppression class-wise with *nms_threshold* and returns *post_nms_count* or less detections per
|
5. Applies non-maximum suppression class-wise with *nms_threshold* and returns *post_nms_count* or less detections per
|
||||||
class.
|
class.
|
||||||
6. Returns *max_detections_per_image* detections if total number of detections is more than *max_detections_per_image*;
|
6. Returns *max_detections_per_image* detections if total number of detections is more than *max_detections_per_image*;
|
||||||
otherwise, returns total number of detections and the output tensor is filled with undefined values for rest output
|
otherwise, returns total number of detections and the output tensor is filled with undefined values for rest output
|
||||||
tensor elements.
|
tensor elements.
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
|
|
||||||
* *score_threshold*
|
* *score_threshold*
|
||||||
|
|
||||||
* **Description**: The *score_threshold* attribute specifies a threshold to consider only detections whose score are
|
* **Description**: The *score_threshold* attribute specifies a threshold to consider only detections whose score are
|
||||||
larger than the threshold.
|
larger than the threshold.
|
||||||
* **Range of values**: non-negative floating point number
|
* **Range of values**: non-negative floating point number
|
||||||
* **Type**: float
|
* **Type**: float
|
||||||
@ -97,7 +97,7 @@ tensor elements.
|
|||||||
|
|
||||||
* *class_agnostic_box_regression*
|
* *class_agnostic_box_regression*
|
||||||
|
|
||||||
* **Description**: *class_agnostic_box_regression* attribute is a flag that specifies whether to delete background
|
* **Description**: *class_agnostic_box_regression* attribute is a flag that specifies whether to delete background
|
||||||
classes or not.
|
classes or not.
|
||||||
* **Range of values**:
|
* **Range of values**:
|
||||||
* `true` means background classes should be deleted
|
* `true` means background classes should be deleted
|
||||||
@ -124,8 +124,8 @@ tensor elements.
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A 2D tensor of type *T* with input ROIs, with shape `[number_of_ROIs, 4]` providing the ROIs as 4-tuples:
|
* **1**: A 2D tensor of type *T* with input ROIs, with shape `[number_of_ROIs, 4]` providing the ROIs as 4-tuples:
|
||||||
[x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>]. The batch dimension of first, second, and third inputs
|
[x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>]. The batch dimension of first, second, and third inputs
|
||||||
should be the same. **Required.**
|
should be the same. **Required.**
|
||||||
|
|
||||||
* **2**: A 2D tensor of type *T* with shape `[number_of_ROIs, num_classes * 4]` providing deltas for input boxes.
|
* **2**: A 2D tensor of type *T* with shape `[number_of_ROIs, num_classes * 4]` providing deltas for input boxes.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
**Category**: Object detection
|
**Category**: Object detection
|
||||||
|
|
||||||
**Short description**: The *ExperimentalDetectronGenerateProposalsSingleImage* operation computes ROIs and their scores
|
**Short description**: The *ExperimentalDetectronGenerateProposalsSingleImage* operation computes ROIs and their scores
|
||||||
based on input data.
|
based on input data.
|
||||||
|
|
||||||
**Detailed description**: The operation performs the following steps:
|
**Detailed description**: The operation performs the following steps:
|
||||||
@ -15,7 +15,7 @@ based on input data.
|
|||||||
4. Sorts all `(proposal, score)` pairs by score from highest to lowest; order of pairs with equal scores is undefined.
|
4. Sorts all `(proposal, score)` pairs by score from highest to lowest; order of pairs with equal scores is undefined.
|
||||||
5. Takes top *pre_nms_count* proposals, if total number of proposals is less than *pre_nms_count* takes all proposals.
|
5. Takes top *pre_nms_count* proposals, if total number of proposals is less than *pre_nms_count* takes all proposals.
|
||||||
6. Applies non-maximum suppression with *nms_threshold*.
|
6. Applies non-maximum suppression with *nms_threshold*.
|
||||||
7. Takes top *post_nms_count* proposals and returns these top proposals and their scores. If total number of proposals
|
7. Takes top *post_nms_count* proposals and returns these top proposals and their scores. If total number of proposals
|
||||||
is less than *post_nms_count* returns output tensors filled with zeroes.
|
is less than *post_nms_count* returns output tensors filled with zeroes.
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
@ -54,15 +54,15 @@ is less than *post_nms_count* returns output tensors filled with zeroes.
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A 1D tensor of type *T* with 3 elements `[image_height, image_width, scale_height_and_width]` providing input
|
* **1**: A 1D tensor of type *T* with 3 elements `[image_height, image_width, scale_height_and_width]` providing input
|
||||||
image size info. **Required.**
|
image size info. **Required.**
|
||||||
|
|
||||||
* **2**: A 2D tensor of type *T* with shape `[height * width * number_of_channels, 4]` providing anchors. **Required.**
|
* **2**: A 2D tensor of type *T* with shape `[height * width * number_of_channels, 4]` providing anchors. **Required.**
|
||||||
|
|
||||||
* **3**: A 3D tensor of type *T* with shape `[number_of_channels * 4, height, width]` providing deltas for anchors.
|
* **3**: A 3D tensor of type *T* with shape `[number_of_channels * 4, height, width]` providing deltas for anchors.
|
||||||
Height and width for third and fourth inputs should be equal. **Required.**
|
Height and width for third and fourth inputs should be equal. **Required.**
|
||||||
|
|
||||||
* **4**: A 3D tensor of type *T* with shape `[number_of_channels, height, width]` providing proposals scores.
|
* **4**: A 3D tensor of type *T* with shape `[number_of_channels, height, width]` providing proposals scores.
|
||||||
**Required.**
|
**Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
|
|
||||||
**Short description**: The *ExperimentalDetectronPriorGridGenerator* operation generates prior grids of specified sizes.
|
**Short description**: The *ExperimentalDetectronPriorGridGenerator* operation generates prior grids of specified sizes.
|
||||||
|
|
||||||
**Detailed description**: The operation takes coordinates of centres of boxes and adds strides with offset `0.5` to them to
|
**Detailed description**: The operation takes coordinates of centres of boxes and adds strides with offset `0.5` to them to
|
||||||
calculate coordinates of prior grids.
|
calculate coordinates of prior grids.
|
||||||
|
|
||||||
Numbers of generated cells is `featmap_height` and `featmap_width` if *h* and *w* are zeroes; otherwise, *h* and *w*,
|
Numbers of generated cells is `featmap_height` and `featmap_width` if *h* and *w* are zeroes; otherwise, *h* and *w*,
|
||||||
respectively. Steps of generated grid are `image_height` / `layer_height` and `image_width` / `layer_width` if
|
respectively. Steps of generated grid are `image_height` / `layer_height` and `image_width` / `layer_width` if
|
||||||
*stride_h* and *stride_w* are zeroes; otherwise, *stride_h* and *stride_w*, respectively.
|
*stride_h* and *stride_w* are zeroes; otherwise, *stride_h* and *stride_w*, respectively.
|
||||||
|
|
||||||
`featmap_height`, `featmap_width`, `image_height` and `image_width` are spatial dimensions values from second and third
|
`featmap_height`, `featmap_width`, `image_height` and `image_width` are spatial dimensions values from second and third
|
||||||
inputs, respectively.
|
inputs, respectively.
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
@ -35,7 +35,7 @@ inputs, respectively.
|
|||||||
* **Type**: int
|
* **Type**: int
|
||||||
* **Default value**: 0
|
* **Default value**: 0
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *w*
|
* *w*
|
||||||
|
|
||||||
* **Description**: The *w* attribute specifies number of cells of the generated grid with respect to width.
|
* **Description**: The *w* attribute specifies number of cells of the generated grid with respect to width.
|
||||||
@ -51,7 +51,7 @@ inputs, respectively.
|
|||||||
* **Type**: float
|
* **Type**: float
|
||||||
* **Default value**: 0.0
|
* **Default value**: 0.0
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *stride_y*
|
* *stride_y*
|
||||||
|
|
||||||
* **Description**: The *stride_y* attribute specifies the step of generated grid with respect to y coordinate.
|
* **Description**: The *stride_y* attribute specifies the step of generated grid with respect to y coordinate.
|
||||||
@ -64,19 +64,19 @@ inputs, respectively.
|
|||||||
|
|
||||||
* **1**: A 2D tensor of type *T* with shape `[number_of_priors, 4]` contains priors. **Required.**
|
* **1**: A 2D tensor of type *T* with shape `[number_of_priors, 4]` contains priors. **Required.**
|
||||||
|
|
||||||
* **2**: A 4D tensor of type *T* with input feature map `[1, number_of_channels, featmap_height, featmap_width]`. This
|
* **2**: A 4D tensor of type *T* with input feature map `[1, number_of_channels, featmap_height, featmap_width]`. This
|
||||||
operation uses only sizes of this input tensor, not its data.**Required.**
|
operation uses only sizes of this input tensor, not its data.**Required.**
|
||||||
|
|
||||||
* **3**: A 4D tensor of type *T* with input image `[1, number_of_channels, image_height, image_width]`. The number of
|
* **3**: A 4D tensor of type *T* with input image `[1, number_of_channels, image_height, image_width]`. The number of
|
||||||
channels of both feature map and input image tensors must match. This operation uses only sizes of this input tensor,
|
channels of both feature map and input image tensors must match. This operation uses only sizes of this input tensor,
|
||||||
not its data. **Required.**
|
not its data. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T* with priors grid with shape `[featmap_height * featmap_width * number_of_priors, 4]`
|
* **1**: A tensor of type *T* with priors grid with shape `[featmap_height * featmap_width * number_of_priors, 4]`
|
||||||
if flatten is `true` or `[featmap_height, featmap_width, number_of_priors, 4]`, otherwise.
|
if flatten is `true` or `[featmap_height, featmap_width, number_of_priors, 4]`, otherwise.
|
||||||
If 0 < *h* < `featmap_height` and/or 0 < *w* < `featmap_width` the output data size is less than
|
If 0 < *h* < `featmap_height` and/or 0 < *w* < `featmap_width` the output data size is less than
|
||||||
`featmap_height` * `featmap_width` * `number_of_priors` * 4 and the output tensor is filled with undefined values for
|
`featmap_height` * `featmap_width` * `number_of_priors` * 4 and the output tensor is filled with undefined values for
|
||||||
rest output tensor elements.
|
rest output tensor elements.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
**Category**: Object detection
|
**Category**: Object detection
|
||||||
|
|
||||||
**Short description**: *ExperimentalDetectronROIFeatureExtractor* is the [ROIAlign](ROIAlign_3.md) operation applied
|
**Short description**: *ExperimentalDetectronROIFeatureExtractor* is the [ROIAlign](ROIAlign_3.md) operation applied
|
||||||
over a feature pyramid.
|
over a feature pyramid.
|
||||||
|
|
||||||
**Detailed description**: *ExperimentalDetectronROIFeatureExtractor* maps input ROIs to the levels of the pyramid
|
**Detailed description**: *ExperimentalDetectronROIFeatureExtractor* maps input ROIs to the levels of the pyramid
|
||||||
depending on the sizes of ROIs and parameters of the operation, and then extracts features via ROIAlign from
|
depending on the sizes of ROIs and parameters of the operation, and then extracts features via ROIAlign from
|
||||||
corresponding pyramid levels.
|
corresponding pyramid levels.
|
||||||
|
|
||||||
Operation applies the *ROIAlign* algorithm to the pyramid layers:
|
Operation applies the *ROIAlign* algorithm to the pyramid layers:
|
||||||
@ -23,7 +23,7 @@ PyramidLevelMapper maps the ROI to the pyramid level using the following formula
|
|||||||
|
|
||||||
Here 224 is the canonical ImageNet pre-training size, 2 is the pyramid starting level, and `w`, `h` are the ROI width and height.
|
Here 224 is the canonical ImageNet pre-training size, 2 is the pyramid starting level, and `w`, `h` are the ROI width and height.
|
||||||
|
|
||||||
For more details please see the following source:
|
For more details please see the following source:
|
||||||
[Feature Pyramid Networks for Object Detection](https://arxiv.org/pdf/1612.03144.pdf).
|
[Feature Pyramid Networks for Object Detection](https://arxiv.org/pdf/1612.03144.pdf).
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
@ -38,7 +38,7 @@ For more details please see the following source:
|
|||||||
|
|
||||||
* *sampling_ratio*
|
* *sampling_ratio*
|
||||||
|
|
||||||
* **Description**: The *sampling_ratio* attribute specifies the number of sampling points per the output value. If 0,
|
* **Description**: The *sampling_ratio* attribute specifies the number of sampling points per the output value. If 0,
|
||||||
then use adaptive number computed as `ceil(roi_width / output_width)`, and likewise for height.
|
then use adaptive number computed as `ceil(roi_width / output_width)`, and likewise for height.
|
||||||
* **Range of values**: a non-negative integer number
|
* **Range of values**: a non-negative integer number
|
||||||
* **Type**: int
|
* **Type**: int
|
||||||
@ -47,8 +47,8 @@ For more details please see the following source:
|
|||||||
|
|
||||||
* *pyramid_scales*
|
* *pyramid_scales*
|
||||||
|
|
||||||
* **Description**: The *pyramid_scales* enlists `image_size / layer_size[l]` ratios for pyramid layers `l=1,...,L`,
|
* **Description**: The *pyramid_scales* enlists `image_size / layer_size[l]` ratios for pyramid layers `l=1,...,L`,
|
||||||
where `L` is the number of pyramid layers, and `image_size` refers to network's input image. Note that pyramid's
|
where `L` is the number of pyramid layers, and `image_size` refers to network's input image. Note that pyramid's
|
||||||
largest layer may have smaller size than input image, e.g. `image_size` is `800 x 1344` in the XML example below.
|
largest layer may have smaller size than input image, e.g. `image_size` is `800 x 1344` in the XML example below.
|
||||||
* **Range of values**: a list of positive integer numbers
|
* **Range of values**: a list of positive integer numbers
|
||||||
* **Type**: int[]
|
* **Type**: int[]
|
||||||
@ -67,21 +67,21 @@ For more details please see the following source:
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 2D input tensor of type *T* with shape `[number_of_ROIs, 4]` providing the ROIs as 4-tuples:
|
* **1**: 2D input tensor of type *T* with shape `[number_of_ROIs, 4]` providing the ROIs as 4-tuples:
|
||||||
[x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>]. Coordinates *x* and *y* are refer to the network's input
|
[x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>]. Coordinates *x* and *y* are refer to the network's input
|
||||||
*image_size*. **Required**.
|
*image_size*. **Required.**
|
||||||
|
|
||||||
* **2**, ..., **L**: Pyramid of 4D input tensors with feature maps. Shape must be
|
* **2**, ..., **L**: Pyramid of 4D input tensors with feature maps. Shape must be
|
||||||
`[1, number_of_channels, layer_size[l], layer_size[l]]`. The number of channels must be the same for all layers of the
|
`[1, number_of_channels, layer_size[l], layer_size[l]]`. The number of channels must be the same for all layers of the
|
||||||
pyramid. The layer width and height must equal to the `layer_size[l] = image_size / pyramid_scales[l]`. **Required**.
|
pyramid. The layer width and height must equal to the `layer_size[l] = image_size / pyramid_scales[l]`. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
* **1**: 4D output tensor of type *T* with ROIs features. Shape must be
|
* **1**: 4D output tensor of type *T* with ROIs features. Shape must be
|
||||||
`[number_of_ROIs, number_of_channels, output_size, output_size]`. Channels number is the same as for all images in the
|
`[number_of_ROIs, number_of_channels, output_size, output_size]`. Channels number is the same as for all images in the
|
||||||
input pyramid.
|
input pyramid.
|
||||||
|
|
||||||
* **2**: 2D output tensor of type *T* with reordered ROIs according to their mapping to the pyramid levels. Shape
|
* **2**: 2D output tensor of type *T* with reordered ROIs according to their mapping to the pyramid levels. Shape
|
||||||
must be the same as for 1 input: `[number_of_ROIs, 4]`.
|
must be the same as for 1 input: `[number_of_ROIs, 4]`.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
@ -61,9 +61,9 @@ ROIs coordinates are specified in absolute values for the average mode and in no
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 4D input tensor with shape `[N, C, H, W]` and type *T* with feature maps. Required.
|
* **1**: 4D input tensor with shape `[N, C, H, W]` and type *T* with feature maps. **Required.**
|
||||||
|
|
||||||
* **2**: 2D input tensor with shape `[num_boxes, 5]`. It contains a list of five element tuples that describe a region of interest: `[batch_id, x_1, y_1, x_2, y_2]`. Required.
|
* **2**: 2D input tensor with shape `[num_boxes, 5]`. It contains a list of five element tuples that describe a region of interest: `[batch_id, x_1, y_1, x_2, y_2]`. **Required.**
|
||||||
Batch indices must be in the range of `[0, N-1]`.
|
Batch indices must be in the range of `[0, N-1]`.
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
@ -59,9 +59,9 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `output_size` - 1D tensor with two integer elements `[height, width]`. Specifies the spatial size of generated grid with boxes. Required.
|
* **1**: `output_size` - 1D tensor with two integer elements `[height, width]`. Specifies the spatial size of generated grid with boxes. **Required.**
|
||||||
|
|
||||||
* **2**: `image_size` - 1D tensor with two integer elements `[image_height, image_width]` that specifies shape of the image for which boxes are generated. Optional.
|
* **2**: `image_size` - 1D tensor with two integer elements `[image_height, image_width]` that specifies shape of the image for which boxes are generated. **Optional.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -138,9 +138,9 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `output_size` - 1D tensor of type *T_INT* with two elements `[height, width]`. Specifies the spatial size of generated grid with boxes. **Required**.
|
* **1**: `output_size` - 1D tensor of type *T_INT* with two elements `[height, width]`. Specifies the spatial size of generated grid with boxes. **Required.**
|
||||||
|
|
||||||
* **2**: `image_size` - 1D tensor of type *T_INT* with two elements `[image_height, image_width]` that specifies shape of the image for which boxes are generated. **Required**.
|
* **2**: `image_size` - 1D tensor of type *T_INT* with two elements `[image_height, image_width]` that specifies shape of the image for which boxes are generated. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -129,11 +129,11 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 4D tensor of type *T* and shape `[batch_size, 2*K, H, W]` with class prediction scores. Required.
|
* **1**: 4D tensor of type *T* and shape `[batch_size, 2*K, H, W]` with class prediction scores. **Required.**
|
||||||
|
|
||||||
* **2**: 4D tensor of type *T* and shape `[batch_size, 4*K, H, W]` with deltas for each bounding box. Required.
|
* **2**: 4D tensor of type *T* and shape `[batch_size, 4*K, H, W]` with deltas for each bounding box. **Required.**
|
||||||
|
|
||||||
* **3**: 1D tensor of type *T* with 3 or 4 elements: `[image_height, image_width, scale_height_and_width]` or `[image_height, image_width, scale_height, scale_width]`. Required.
|
* **3**: 1D tensor of type *T* with 3 or 4 elements: `[image_height, image_width, scale_height_and_width]` or `[image_height, image_width, scale_height, scale_width]`. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -138,11 +138,11 @@ the second optional tensor of shape `[batch_size * post_nms_topn]` with probabil
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 4D tensor of type *T* and shape `[batch_size, 2*K, H, W]` with class prediction scores. Required.
|
* **1**: 4D tensor of type *T* and shape `[batch_size, 2*K, H, W]` with class prediction scores. **Required.**
|
||||||
|
|
||||||
* **2**: 4D tensor of type *T* and shape `[batch_size, 4*K, H, W]` with deltas for each bounding box. Required.
|
* **2**: 4D tensor of type *T* and shape `[batch_size, 4*K, H, W]` with deltas for each bounding box. **Required.**
|
||||||
|
|
||||||
* **3**: 1D tensor of type *T* with 3 or 4 elements: `[image_height, image_width, scale_height_and_width]` or `[image_height, image_width, scale_height, scale_width]`. Required.
|
* **3**: 1D tensor of type *T* with 3 or 4 elements: `[image_height, image_width, scale_height_and_width]` or `[image_height, image_width, scale_height, scale_width]`. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -55,13 +55,13 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 4D input tensor of shape `[N, C, H, W]` with feature maps of type *T*. Required.
|
* **1**: 4D input tensor of shape `[N, C, H, W]` with feature maps of type *T*. **Required.**
|
||||||
|
|
||||||
* **2**: 2D input tensor of shape `[NUM_ROIS, 4]` describing box consisting of 4 element tuples: `[x_1, y_1, x_2, y_2]` in relative coordinates of type *T*.
|
* **2**: 2D input tensor of shape `[NUM_ROIS, 4]` describing box consisting of 4 element tuples: `[x_1, y_1, x_2, y_2]` in relative coordinates of type *T*.
|
||||||
The box height and width are calculated the following way: `roi_width = max(spatial_scale * (x_2 - x_1), 1.0)`,
|
The box height and width are calculated the following way: `roi_width = max(spatial_scale * (x_2 - x_1), 1.0)`,
|
||||||
`roi_height = max(spatial_scale * (y_2 - y_1), 1.0)`, so the malformed boxes are expressed as a box of size `1 x 1`. Required.
|
`roi_height = max(spatial_scale * (y_2 - y_1), 1.0)`, so the malformed boxes are expressed as a box of size `1 x 1`. **Required.**
|
||||||
|
|
||||||
* **3**: 1D input tensor of shape `[NUM_ROIS]` with batch indices of type *IND_T*. Required.
|
* **3**: 1D input tensor of shape `[NUM_ROIS]` with batch indices of type *IND_T*. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -52,9 +52,9 @@ The box height and width have different representation based on **method** attri
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 4D input tensor of shape `[N, C, H, W]` with feature maps of type *T*. Required.
|
* **1**: 4D input tensor of shape `[N, C, H, W]` with feature maps of type *T*. **Required.**
|
||||||
|
|
||||||
* **2**: 2D input tensor of shape `[NUM_ROIS, 5]` describing region of interest box consisting of 5 element tuples of type *T*: `[batch_id, x_1, y_1, x_2, y_2]`. Required.
|
* **2**: 2D input tensor of shape `[NUM_ROIS, 5]` describing region of interest box consisting of 5 element tuples of type *T*: `[batch_id, x_1, y_1, x_2, y_2]`. **Required.**
|
||||||
Batch indices must be in the range of `[0, N-1]`.
|
Batch indices must be in the range of `[0, N-1]`.
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,9 +60,9 @@ This is a scalar that specifies padding for each spatial dimension.
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` - Input tensor with data for interpolation. Type of elements is any supported floating point type. Required.
|
* **1**: `data` - Input tensor with data for interpolation. Type of elements is any supported floating point type. **Required.**
|
||||||
|
|
||||||
* **2**: `target_spatial_shape` - 1D tensor describing output shape for spatial axes. Number of elements matches the number of indices in *axes* attribute, the order matches as well. Required.
|
* **2**: `target_spatial_shape` - 1D tensor describing output shape for spatial axes. Number of elements matches the number of indices in *axes* attribute, the order matches as well. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ declared in `variable_id` and returns an error otherwise.
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `new_value` - input tensor of any supported type. **Required**.
|
* **1**: `new_value` - input tensor of any supported type. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
**Category**: Infrastructure
|
**Category**: Infrastructure
|
||||||
|
|
||||||
**Short description**: *Loop* operation performs recurrent execution of the network, which is described in the `body`, iterating through the data.
|
**Short description**: *Loop* operation performs recurrent execution of the network, which is described in the `body`, iterating through the data.
|
||||||
The operation has similar semantic to the ONNX* Loop [operation](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Loop-13).
|
The operation has similar semantic to the ONNX* Loop [operation](https://github.com/onnx/onnx/blob/master/docs/Changelog.md#Loop-13).
|
||||||
|
|
||||||
**Detailed description**
|
**Detailed description**
|
||||||
@ -20,21 +20,21 @@ There are several combinations of these two inputs `(trip_count, execution condi
|
|||||||
```
|
```
|
||||||
input (-1, true) // infinite loop
|
input (-1, true) // infinite loop
|
||||||
bool cond = true;
|
bool cond = true;
|
||||||
for (int i = 0; cond; ++i)
|
for (int i = 0; cond; ++i)
|
||||||
{
|
{
|
||||||
cond = true; // sub-graph calculating condition must always return "true"!
|
cond = true; // sub-graph calculating condition must always return "true"!
|
||||||
}
|
}
|
||||||
|
|
||||||
input (-1, cond) // while loop
|
input (-1, cond) // while loop
|
||||||
bool cond = ...;
|
bool cond = ...;
|
||||||
for (int i = 0; cond; ++i)
|
for (int i = 0; cond; ++i)
|
||||||
{
|
{
|
||||||
cond = ...;
|
cond = ...;
|
||||||
}
|
}
|
||||||
|
|
||||||
input (-1, true) // do-while loop
|
input (-1, true) // do-while loop
|
||||||
bool cond = true;
|
bool cond = true;
|
||||||
for (int i = 0; cond; ++i)
|
for (int i = 0; cond; ++i)
|
||||||
{
|
{
|
||||||
cond = ...;
|
cond = ...;
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ There are several combinations of these two inputs `(trip_count, execution condi
|
|||||||
input (trip_count, true) // for loop
|
input (trip_count, true) // for loop
|
||||||
int trip_count = ...;
|
int trip_count = ...;
|
||||||
bool cond = true;
|
bool cond = true;
|
||||||
for (int i = 0; i < trip_count; ++i)
|
for (int i = 0; i < trip_count; ++i)
|
||||||
{
|
{
|
||||||
cond = true; // sub-graph calculating condition must always return "true"!
|
cond = true; // sub-graph calculating condition must always return "true"!
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ There are several combinations of these two inputs `(trip_count, execution condi
|
|||||||
input (trip_count, cond) // for with condition
|
input (trip_count, cond) // for with condition
|
||||||
int trip_count = ...;
|
int trip_count = ...;
|
||||||
bool cond = ...;
|
bool cond = ...;
|
||||||
for (int i = 0; i < trip_count && cond; ++i)
|
for (int i = 0; i < trip_count && cond; ++i)
|
||||||
{
|
{
|
||||||
cond = ...;
|
cond = ...;
|
||||||
}
|
}
|
||||||
@ -133,11 +133,11 @@ Loop operation description in the IR also has several special sections: `body`,
|
|||||||
|
|
||||||
**Loop Inputs**
|
**Loop Inputs**
|
||||||
|
|
||||||
* **Trip count**: A scalar or 1D tensor with 1 element of `int64` or `int32` type specifying maximum number of iterations. *Required*.
|
* **Trip count**: A scalar or 1D tensor with 1 element of `int64` or `int32` type specifying maximum number of iterations. **Required.**
|
||||||
|
|
||||||
* **ExecutionCondition**: A scalar or 1D tensor with 1 element of `boolean` type specifying whether to execute the first iteration or not. `True` value means to execute the 1st iteration. *Required*.
|
* **ExecutionCondition**: A scalar or 1D tensor with 1 element of `boolean` type specifying whether to execute the first iteration or not. `True` value means to execute the 1st iteration. **Required.**
|
||||||
|
|
||||||
* **Multiple other inputs**: tensors of different types and shapes. *Optional*.
|
* **Multiple other inputs**: tensors of different types and shapes. **Optional.**
|
||||||
|
|
||||||
**Loop Outputs**
|
**Loop Outputs**
|
||||||
|
|
||||||
@ -146,12 +146,12 @@ Loop operation description in the IR also has several special sections: `body`,
|
|||||||
|
|
||||||
**Body Inputs**
|
**Body Inputs**
|
||||||
|
|
||||||
* **Multiple inputs**: tensors of different types and shapes except the one corresponding to the current iteration number. This input is marked in the port_map with attribute `purpose = "current_iteration"` and produces a scalar or 1D tensor with 1 element of `int64` or `int32` type. *Optional*.
|
* **Multiple inputs**: tensors of different types and shapes except the one corresponding to the current iteration number. This input is marked in the port_map with attribute `purpose = "current_iteration"` and produces a scalar or 1D tensor with 1 element of `int64` or `int32` type. **Optional.**
|
||||||
|
|
||||||
|
|
||||||
**Body Outputs**
|
**Body Outputs**
|
||||||
|
|
||||||
* **Multiple outputs**: Results of execution of the `body`. Tensors of any type and shape except the one corresponding to the output with execution condition. This output is marked in the port_map with attribute `purpose = "execution_condition"` and is mandatory and produces a scalar or 1D tensor with 1 element of `boolean` type. Other outputs are optional.
|
* **Multiple outputs**: Results of execution of the `body`. Tensors of any type and shape except the one corresponding to the output with execution condition. This output is marked in the port_map with attribute `purpose = "execution_condition"` and is mandatory and produces a scalar or 1D tensor with 1 element of `boolean` type. Other outputs are optional.
|
||||||
|
|
||||||
|
|
||||||
**Examples**
|
**Examples**
|
||||||
|
@ -25,7 +25,7 @@ with the shape and type from the 1 input.
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `init_value` - input tensor with constant values of any supported type. **Required**.
|
* **1**: `init_value` - input tensor with constant values of any supported type. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T*. **Required**.
|
* **1**: A tensor of type *T*. **Required.**
|
||||||
* **2**: A tensor of type *T*. **Required**.
|
* **2**: A tensor of type *T*. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T*. **Required**.
|
* **1**: A tensor of type *T*. **Required.**
|
||||||
* **2**: A tensor of type *T*. **Required**.
|
* **2**: A tensor of type *T*. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T*. **Required**.
|
* **1**: A tensor of type *T*. **Required.**
|
||||||
* **2**: A tensor of type *T*. **Required**.
|
* **2**: A tensor of type *T*. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ Before matrix multiplication, there is an implicit shape alignment for input arg
|
|||||||
1. Applying transpositions specified by optional `transpose_a` and `transpose_b` attributes. Only the two right-most dimensions are transposed, other dimensions remain the same. Transpose attributes are ignored for 1D tensors.
|
1. Applying transpositions specified by optional `transpose_a` and `transpose_b` attributes. Only the two right-most dimensions are transposed, other dimensions remain the same. Transpose attributes are ignored for 1D tensors.
|
||||||
|
|
||||||
2. One-dimensional tensors unsqueezing is applied for each input independently. The axes inserted in this step are not included in the output shape.
|
2. One-dimensional tensors unsqueezing is applied for each input independently. The axes inserted in this step are not included in the output shape.
|
||||||
* If rank of the **first** input is equal to 1, it is always unsqueezed to 2D tensor **row vector** (regardless of `transpose_a`) by adding axes with size 1 at ROW_INDEX_DIM, to the **left** of the shape. For example `[S]` will be reshaped to `[1, S]`.
|
* If rank of the **first** input is equal to 1, it is always unsqueezed to 2D tensor **row vector** (regardless of `transpose_a`) by adding axes with size 1 at ROW_INDEX_DIM, to the **left** of the shape. For example `[S]` will be reshaped to `[1, S]`.
|
||||||
* If rank of the **second** input is equal to 1, it is always unsqueezed to 2D tensor **column vector** (regardless of `transpose_b`) by adding axes with size 1 at COL_INDEX_DIM, to the **right** of the shape. For example `[S]` will be reshaped to `[S, 1]`.
|
* If rank of the **second** input is equal to 1, it is always unsqueezed to 2D tensor **column vector** (regardless of `transpose_b`) by adding axes with size 1 at COL_INDEX_DIM, to the **right** of the shape. For example `[S]` will be reshaped to `[S, 1]`.
|
||||||
|
|
||||||
3. If ranks of input arguments are different after steps 1 and 2, the tensor with a smaller rank is unsqueezed from the left side of the shape by necessary number of axes to make both shapes of the same rank.
|
3. If ranks of input arguments are different after steps 1 and 2, the tensor with a smaller rank is unsqueezed from the left side of the shape by necessary number of axes to make both shapes of the same rank.
|
||||||
@ -57,9 +57,9 @@ Two attributes, `transpose_a` and `transpose_b` specify embedded transposition f
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Tensor of type *T* with matrices A. Rank >= 1. Required.
|
* **1**: Tensor of type *T* with matrices A. Rank >= 1. **Required.**
|
||||||
|
|
||||||
* **2**: Tensor of type *T* with matrices B. Rank >= 1. Required.
|
* **2**: Tensor of type *T* with matrices B. Rank >= 1. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
@ -204,4 +204,4 @@ Two attributes, `transpose_a` and `transpose_b` specify embedded transposition f
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -63,10 +63,10 @@ Where
|
|||||||
<input>
|
<input>
|
||||||
<port id="0"> <!-- data -->
|
<port id="0"> <!-- data -->
|
||||||
<dim>10</dim> <!-- batch -->
|
<dim>10</dim> <!-- batch -->
|
||||||
<dim>2</dim> <!-- spatial dimension 1 -->
|
<dim>2</dim> <!-- spatial dimension 1 -->
|
||||||
</port>
|
</port>
|
||||||
<port id="1"> <!-- block_shape value: [1, 5] -->
|
<port id="1"> <!-- block_shape value: [1, 5] -->
|
||||||
<dim>2</dim>
|
<dim>2</dim>
|
||||||
</port>
|
</port>
|
||||||
<port id="2"> <!-- crops_begin value: [0, 2] -->
|
<port id="2"> <!-- crops_begin value: [0, 2] -->
|
||||||
<dim>2</dim>
|
<dim>2</dim>
|
||||||
@ -76,7 +76,7 @@ Where
|
|||||||
</port>
|
</port>
|
||||||
</input>
|
</input>
|
||||||
<output>
|
<output>
|
||||||
<port id="3">
|
<port id="3">
|
||||||
<dim>2</dim> <!-- data.shape[0] / (block_shape.shape[0] * block_shape.shape[1]) -->
|
<dim>2</dim> <!-- data.shape[0] / (block_shape.shape[0] * block_shape.shape[1]) -->
|
||||||
<dim>8</dim> <!-- data.shape[1] * block_shape.shape[1] - crops_begin[1] - crops_end[1]-->
|
<dim>8</dim> <!-- data.shape[1] * block_shape.shape[1] - crops_begin[1] - crops_end[1]-->
|
||||||
</port>
|
</port>
|
||||||
@ -91,13 +91,13 @@ Where
|
|||||||
<input>
|
<input>
|
||||||
<port id="0"> <!-- data -->
|
<port id="0"> <!-- data -->
|
||||||
<dim>48</dim> <!-- batch -->
|
<dim>48</dim> <!-- batch -->
|
||||||
<dim>3</dim> <!-- spatial dimension 1 -->
|
<dim>3</dim> <!-- spatial dimension 1 -->
|
||||||
<dim>3</dim> <!-- spatial dimension 2 -->
|
<dim>3</dim> <!-- spatial dimension 2 -->
|
||||||
<dim>1</dim> <!-- spatial dimension 3 -->
|
<dim>1</dim> <!-- spatial dimension 3 -->
|
||||||
<dim>3</dim> <!-- spatial dimension 4 -->
|
<dim>3</dim> <!-- spatial dimension 4 -->
|
||||||
</port>
|
</port>
|
||||||
<port id="1"> <!-- block_shape value: [1, 2, 4, 3, 1] -->
|
<port id="1"> <!-- block_shape value: [1, 2, 4, 3, 1] -->
|
||||||
<dim>5</dim>
|
<dim>5</dim>
|
||||||
</port>
|
</port>
|
||||||
<port id="2"> <!-- crops_begin value: [0, 0, 1, 0, 0] -->
|
<port id="2"> <!-- crops_begin value: [0, 0, 1, 0, 0] -->
|
||||||
<dim>5</dim>
|
<dim>5</dim>
|
||||||
@ -107,7 +107,7 @@ Where
|
|||||||
</port>
|
</port>
|
||||||
</input>
|
</input>
|
||||||
<output>
|
<output>
|
||||||
<port id="3">
|
<port id="3">
|
||||||
<dim>2</dim> <!-- data.shape[0] / (block_shape.shape[0] * block_shape.shape[1] * ... * block_shape.shape[4]) -->
|
<dim>2</dim> <!-- data.shape[0] / (block_shape.shape[0] * block_shape.shape[1] * ... * block_shape.shape[4]) -->
|
||||||
<dim>6</dim> <!-- data.shape[1] * block_shape.shape[1] - crops_begin[1] - crops_end[1]-->
|
<dim>6</dim> <!-- data.shape[1] * block_shape.shape[1] - crops_begin[1] - crops_end[1]-->
|
||||||
<dim>10</dim> <!-- data.shape[2] * block_shape.shape[2] - crops_begin[2] - crops_end[2] -->
|
<dim>10</dim> <!-- data.shape[2] * block_shape.shape[2] - crops_begin[2] - crops_end[2] -->
|
||||||
|
@ -32,9 +32,9 @@ For example, `axes_mapping = [1]` enables broadcasting of a tensor with shape `[
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `data` - source tensor of any type and shape that is being broadcasted. Required.
|
* **1**: `data` - source tensor of any type and shape that is being broadcasted. **Required.**
|
||||||
|
|
||||||
* **2**: `taget_shape` - 1D integer tensor describing output shape. Required.
|
* **2**: `taget_shape` - 1D integer tensor describing output shape. **Required.**
|
||||||
|
|
||||||
* **3**: `axes_mapping` - 1D integer tensor describing a list of axis indices, each index maps an axis from the 1st input tensor `data` to axis in the output. The index values in this tensor should be sorted, that disables on-the-fly transpositions of input `data` tensor while the broadcasting. `axes_mapping` input is optional depending on `mode` value.
|
* **3**: `axes_mapping` - 1D integer tensor describing a list of axis indices, each index maps an axis from the 1st input tensor `data` to axis in the output. The index values in this tensor should be sorted, that disables on-the-fly transpositions of input `data` tensor while the broadcasting. `axes_mapping` input is optional depending on `mode` value.
|
||||||
|
|
||||||
|
@ -35,9 +35,9 @@ For example, `axes_mapping = [1]` enables broadcasting of a tensor with shape `[
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `data` - source tensor of type *T* and shape that is being broadcasted. Required.
|
* **1**: `data` - source tensor of type *T* and shape that is being broadcasted. **Required.**
|
||||||
|
|
||||||
* **2**: `target_shape` - 1D tensor of type *T_SHAPE* describing output shape. Required.
|
* **2**: `target_shape` - 1D tensor of type *T_SHAPE* describing output shape. **Required.**
|
||||||
|
|
||||||
* **3**: `axes_mapping` - 1D tensor of type *T_SHAPE* describing a list of axis indices, each index maps an axis from the 1st input tensor `data` to axis in the output. The index values in this tensor should be sorted, that disables on-the-fly transpositions of input `data` tensor while the broadcasting. `axes_mapping` input is needed for `mode` equal to *explicit* only.
|
* **3**: `axes_mapping` - 1D tensor of type *T_SHAPE* describing a list of axis indices, each index maps an axis from the 1st input tensor `data` to axis in the output. The index values in this tensor should be sorted, that disables on-the-fly transpositions of input `data` tensor while the broadcasting. `axes_mapping` input is needed for `mode` equal to *explicit* only.
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ If `mode = depth_first`:
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` - input tensor of type *T* with rank >= 3. **Required**.
|
* **1**: `data` - input tensor of type *T* with rank >= 3. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
**Short description**: *GatherElements* takes elements from the input `data` tensor at positions specified in the `indices` tensor.
|
**Short description**: *GatherElements* takes elements from the input `data` tensor at positions specified in the `indices` tensor.
|
||||||
|
|
||||||
**Detailed description** *GatherElements* takes elements from the `data` tensor at positions specified in the `indices` tensor.
|
**Detailed description** *GatherElements* takes elements from the `data` tensor at positions specified in the `indices` tensor.
|
||||||
The `data` and `indices` tensors have the same rank `r >= 1`. Optional attribute `axis` determines
|
The `data` and `indices` tensors have the same rank `r >= 1`. Optional attribute `axis` determines
|
||||||
along which axis elements with indices specified in `indices` are taken. The `indices` tensor has the same shape as
|
along which axis elements with indices specified in `indices` are taken. The `indices` tensor has the same shape as
|
||||||
the `data` tensor except for the `axis` dimension. Output consists of values (gathered from the `data` tensor) for each
|
the `data` tensor except for the `axis` dimension. Output consists of values (gathered from the `data` tensor) for each
|
||||||
element in the `indices` tensor and has the same shape as `indices`.
|
element in the `indices` tensor and has the same shape as `indices`.
|
||||||
|
|
||||||
For instance, in the 3D case (`r = 3`), the output is determined by the following equations:
|
For instance, in the 3D case (`r = 3`), the output is determined by the following equations:
|
||||||
@ -70,8 +70,8 @@ output = [
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
* *axis*
|
* *axis*
|
||||||
* **Description**: Which axis to gather on. Negative value means counting dimensions from the back.
|
* **Description**: Which axis to gather on. Negative value means counting dimensions from the back.
|
||||||
* **Range of values**: `[-r, r-1]` where `r = rank(data)`.
|
* **Range of values**: `[-r, r-1]` where `r = rank(data)`.
|
||||||
* **Type**: int
|
* **Type**: int
|
||||||
* **Required**: *yes*
|
* **Required**: *yes*
|
||||||
@ -79,17 +79,17 @@ output = [
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Tensor of type *T*. This is a tensor of a `rank >= 1`. **Required**.
|
* **1**: Tensor of type *T*. This is a tensor of a `rank >= 1`. **Required.**
|
||||||
|
|
||||||
* **2**: Tensor of type *T_IND* with the same rank as the input. All index values are expected to be within
|
* **2**: Tensor of type *T_IND* with the same rank as the input. All index values are expected to be within
|
||||||
bounds `[0, s-1]`, where `s` is size along `axis` dimension of the `data` tensor. **Required**.
|
bounds `[0, s-1]`, where `s` is size along `axis` dimension of the `data` tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
* **1**: Tensor with gathered values of type *T*. Tensor has the same shape as `indices`.
|
* **1**: Tensor with gathered values of type *T*. Tensor has the same shape as `indices`.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T*: any supported type.
|
* *T*: any supported type.
|
||||||
|
|
||||||
* *T_IND*: `int32` or `int64`.
|
* *T_IND*: `int32` or `int64`.
|
||||||
|
@ -22,7 +22,7 @@ Example 1 shows how *GatherND* operates with elements from `data` tensor:
|
|||||||
|
|
||||||
```
|
```
|
||||||
indices = [[0, 0],
|
indices = [[0, 0],
|
||||||
[1, 0]]
|
[1, 0]]
|
||||||
data = [[1, 2],
|
data = [[1, 2],
|
||||||
[3, 4]]
|
[3, 4]]
|
||||||
output = [1, 3]
|
output = [1, 3]
|
||||||
@ -55,7 +55,7 @@ output = [[[3, 4]],
|
|||||||
* **Description**: *batch_dims* (denoted as `b`) is a leading number of dimensions of `data` tensor and `indices` representing the batches,
|
* **Description**: *batch_dims* (denoted as `b`) is a leading number of dimensions of `data` tensor and `indices` representing the batches,
|
||||||
and *GatherND* starts to gather from the `b+1` dimension.
|
and *GatherND* starts to gather from the `b+1` dimension.
|
||||||
It requires the first `b` dimensions in `data` and `indices` tensors to be equal.
|
It requires the first `b` dimensions in `data` and `indices` tensors to be equal.
|
||||||
In case non default value for *batch_dims* the output shape is calculated as
|
In case non default value for *batch_dims* the output shape is calculated as
|
||||||
`(multiplication of indices.shape[:b]) + indices.shape[b:-1] + data.shape[(indices.shape[-1] + b):]`.
|
`(multiplication of indices.shape[:b]) + indices.shape[b:-1] + data.shape[(indices.shape[-1] + b):]`.
|
||||||
* **Range of values**: integer number and belongs to `[0; min(data.rank, indices.rank))`
|
* **Range of values**: integer number and belongs to `[0; min(data.rank, indices.rank))`
|
||||||
* **Type**: int
|
* **Type**: int
|
||||||
@ -107,7 +107,7 @@ output = [[2], [5], [11], [13], [19], [23]], shape = (6, 1)
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `data` tensor of type *T*. This is a tensor of a rank not less than 1. Required.
|
* **1**: `data` tensor of type *T*. This is a tensor of a rank not less than 1. **Required.**
|
||||||
|
|
||||||
* **2**: `indices` tensor of type *T_IND*. This is a tensor of a rank not less than 1.
|
* **2**: `indices` tensor of type *T_IND*. This is a tensor of a rank not less than 1.
|
||||||
It requires that all indices from this tensor will be in a range `[0, s-1]` where `s` is corresponding dimension to which this index is applied.
|
It requires that all indices from this tensor will be in a range `[0, s-1]` where `s` is corresponding dimension to which this index is applied.
|
||||||
|
@ -43,13 +43,13 @@ Element data types for all input tensors should match each other.
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `step_ids` -- a tensor of shape `[MAX_TIME, BATCH_SIZE, BEAM_WIDTH]` of type *T* with indices from per each step. Required.
|
* **1**: `step_ids` -- a tensor of shape `[MAX_TIME, BATCH_SIZE, BEAM_WIDTH]` of type *T* with indices from per each step. **Required.**
|
||||||
|
|
||||||
* **2**: `parent_idx` -- a tensor of shape `[MAX_TIME, BATCH_SIZE, BEAM_WIDTH]` of type *T* with parent beam indices. Required.
|
* **2**: `parent_idx` -- a tensor of shape `[MAX_TIME, BATCH_SIZE, BEAM_WIDTH]` of type *T* with parent beam indices. **Required.**
|
||||||
|
|
||||||
* **3**: `max_seq_len` -- a tensor of shape `[BATCH_SIZE]` of type *T* with maximum lengths for each sequence in the batch. Required.
|
* **3**: `max_seq_len` -- a tensor of shape `[BATCH_SIZE]` of type *T* with maximum lengths for each sequence in the batch. **Required.**
|
||||||
|
|
||||||
* **4**: `end_token` -- a scalar tensor of type *T* with value of the end marker in a sequence. Required.
|
* **4**: `end_token` -- a scalar tensor of type *T* with value of the end marker in a sequence. **Required.**
|
||||||
|
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
**Detailed description**
|
**Detailed description**
|
||||||
|
|
||||||
output[p_0, p_1, ..., p_{axis-1}, i, ..., j, ...] =
|
output[p_0, p_1, ..., p_{axis-1}, i, ..., j, ...] =
|
||||||
input1[p_0, p_1, ..., p_{axis-1}, input2[i, ..., j], ...]
|
input1[p_0, p_1, ..., p_{axis-1}, input2[i, ..., j], ...]
|
||||||
|
|
||||||
Where `axis` is the value from the third input.
|
Where `axis` is the value from the third input.
|
||||||
@ -17,11 +17,11 @@ Where `axis` is the value from the third input.
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Tensor with arbitrary data. Required.
|
* **1**: Tensor with arbitrary data. **Required.**
|
||||||
|
|
||||||
* **2**: Tensor with indices to gather. The values for indices are in the range `[0, input1[axis] - 1]`. Required.
|
* **2**: Tensor with indices to gather. The values for indices are in the range `[0, input1[axis] - 1]`. **Required.**
|
||||||
|
|
||||||
* **3**: Scalar or 1D tensor *axis* is a dimension index to gather data from. For example, *axis* equal to 1 means that gathering is performed over the first dimension. Negative value means reverse indexing. Allowed values are from `[-len(input1.shape), len(input1.shape) - 1]`. Required.
|
* **3**: Scalar or 1D tensor *axis* is a dimension index to gather data from. For example, *axis* equal to 1 means that gathering is performed over the first dimension. Negative value means reverse indexing. Allowed values are from `[-len(input1.shape), len(input1.shape) - 1]`. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
@ -59,4 +59,3 @@ Where `axis` is the value from the third input.
|
|||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -5,22 +5,22 @@
|
|||||||
**Category**: Data movement operations
|
**Category**: Data movement operations
|
||||||
|
|
||||||
**Short description**: *Gather* operation takes slices of data of the first input tensor according to the indices
|
**Short description**: *Gather* operation takes slices of data of the first input tensor according to the indices
|
||||||
specified with the second input tensor and axis from the third input. Semantics of this operation is identical to
|
specified with the second input tensor and axis from the third input. Semantics of this operation is identical to
|
||||||
TensorFlow\* [Gather](https://www.tensorflow.org/api_docs/python/tf/gather) operation.
|
TensorFlow\* [Gather](https://www.tensorflow.org/api_docs/python/tf/gather) operation.
|
||||||
|
|
||||||
**Detailed description**
|
**Detailed description**
|
||||||
|
|
||||||
output[p_0, p_1, ..., p_{axis-1}, i_b, ..., i_{M-1}, p_{axis+1}, ..., p_{N-1}] =
|
output[p_0, p_1, ..., p_{axis-1}, i_b, ..., i_{M-1}, p_{axis+1}, ..., p_{N-1}] =
|
||||||
data[p_0, p_1, ..., p_{axis-1}, indices[p_0, p_1, ..., p_{b-1}, i_b, ..., i_{M-1}], p_{axis+1}, ..., p_{N-1}]
|
data[p_0, p_1, ..., p_{axis-1}, indices[p_0, p_1, ..., p_{b-1}, i_b, ..., i_{M-1}], p_{axis+1}, ..., p_{N-1}]
|
||||||
|
|
||||||
Where `data`, `indices` and `axis` are tensors from first, second and third inputs correspondingly, `b` is
|
Where `data`, `indices` and `axis` are tensors from first, second and third inputs correspondingly, `b` is
|
||||||
the number of batch dimensions. `N` and `M` are numbers of dimensions of `data` and `indices` tensors, respectively.
|
the number of batch dimensions. `N` and `M` are numbers of dimensions of `data` and `indices` tensors, respectively.
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
* *batch_dims*
|
* *batch_dims*
|
||||||
* **Description**: *batch_dims* (also denoted as `b`) is a leading number of dimensions of `data` tensor and `indices`
|
* **Description**: *batch_dims* (also denoted as `b`) is a leading number of dimensions of `data` tensor and `indices`
|
||||||
representing the batches, and *Gather* starts to gather from the `b` dimension. It requires the first `b`
|
representing the batches, and *Gather* starts to gather from the `b` dimension. It requires the first `b`
|
||||||
dimensions in `data` and `indices` tensors to be equal. If `batch_dims` is less than zero, normalized value is used
|
dimensions in `data` and `indices` tensors to be equal. If `batch_dims` is less than zero, normalized value is used
|
||||||
`batch_dims = indices.rank + batch_dims`.
|
`batch_dims = indices.rank + batch_dims`.
|
||||||
* **Range of values**: `[-min(data.rank, indices.rank); min(data.rank, indices.rank)]` and `batch_dims' <= axis'`.
|
* **Range of values**: `[-min(data.rank, indices.rank); min(data.rank, indices.rank)]` and `batch_dims' <= axis'`.
|
||||||
Where `batch_dims'` and `axis'` stand for normalized `batch_dims` and `axis` values.
|
Where `batch_dims'` and `axis'` stand for normalized `batch_dims` and `axis` values.
|
||||||
@ -33,7 +33,7 @@ Example 1 with default *batch_dims* value:
|
|||||||
batch_dims = 0
|
batch_dims = 0
|
||||||
axis = 0
|
axis = 0
|
||||||
|
|
||||||
indices = [0, 0, 4]
|
indices = [0, 0, 4]
|
||||||
data = [1, 2, 3, 4, 5]
|
data = [1, 2, 3, 4, 5]
|
||||||
output = [1, 1, 5]
|
output = [1, 1, 5]
|
||||||
```
|
```
|
||||||
@ -43,12 +43,12 @@ Example 2 with non-default *batch_dims* value:
|
|||||||
batch_dims = 1
|
batch_dims = 1
|
||||||
axis = 1
|
axis = 1
|
||||||
|
|
||||||
indices = [[0, 0, 4], <-- this is applied to the first batch
|
indices = [[0, 0, 4], <-- this is applied to the first batch
|
||||||
[4, 0, 0]] <-- this is applied to the second batch
|
[4, 0, 0]] <-- this is applied to the second batch
|
||||||
indices_shape = (2, 3)
|
indices_shape = (2, 3)
|
||||||
|
|
||||||
data = [[1, 2, 3, 4, 5], <-- the first batch
|
data = [[1, 2, 3, 4, 5], <-- the first batch
|
||||||
[6, 7, 8, 9, 10]] <-- the second batch
|
[6, 7, 8, 9, 10]] <-- the second batch
|
||||||
data_shape = (2, 5)
|
data_shape = (2, 5)
|
||||||
|
|
||||||
output = [[ 1, 1, 5],
|
output = [[ 1, 1, 5],
|
||||||
@ -63,14 +63,14 @@ axis = 2
|
|||||||
|
|
||||||
indices = [[[0, 0, 4], <-- this is applied to the first batch, index = (0, 0)
|
indices = [[[0, 0, 4], <-- this is applied to the first batch, index = (0, 0)
|
||||||
[4, 0, 0]], <-- this is applied to the second batch, index = (0, 1)
|
[4, 0, 0]], <-- this is applied to the second batch, index = (0, 1)
|
||||||
|
|
||||||
[[1, 2, 4], <-- this is applied to the third batch, index = (1, 0)
|
[[1, 2, 4], <-- this is applied to the third batch, index = (1, 0)
|
||||||
[4, 3, 2]]] <-- this is applied to the fourth batch, index = (1, 1)
|
[4, 3, 2]]] <-- this is applied to the fourth batch, index = (1, 1)
|
||||||
indices_shape = (2, 2, 3)
|
indices_shape = (2, 2, 3)
|
||||||
|
|
||||||
data = [[[1, 2, 3, 4, 5], <-- the first batch, index = (0, 0)
|
data = [[[1, 2, 3, 4, 5], <-- the first batch, index = (0, 0)
|
||||||
[6, 7, 8, 9, 10]], <-- the second batch, index = (0, 1)
|
[6, 7, 8, 9, 10]], <-- the second batch, index = (0, 1)
|
||||||
|
|
||||||
[[11, 12, 13, 14, 15], <-- the third batch, index = (1, 0)
|
[[11, 12, 13, 14, 15], <-- the third batch, index = (1, 0)
|
||||||
[16, 17, 18, 19, 20]]] <-- the fourth batch, index = (1, 1)
|
[16, 17, 18, 19, 20]]] <-- the fourth batch, index = (1, 1)
|
||||||
data_shape = (2, 2, 5)
|
data_shape = (2, 2, 5)
|
||||||
@ -79,7 +79,7 @@ output = [[[ 1, 1, 5],
|
|||||||
[10, 6, 6]],
|
[10, 6, 6]],
|
||||||
|
|
||||||
[[12, 13, 15],
|
[[12, 13, 15],
|
||||||
[20, 19, 18]]]
|
[20, 19, 18]]]
|
||||||
output_shape = (2, 2, 3)
|
output_shape = (2, 2, 3)
|
||||||
```
|
```
|
||||||
Example 4 with *axis* > *batch_dims*:
|
Example 4 with *axis* > *batch_dims*:
|
||||||
@ -87,7 +87,7 @@ Example 4 with *axis* > *batch_dims*:
|
|||||||
batch_dims = 1
|
batch_dims = 1
|
||||||
axis = 2
|
axis = 2
|
||||||
|
|
||||||
indices = [[1, 2, 4], <-- this is applied to the first batch
|
indices = [[1, 2, 4], <-- this is applied to the first batch
|
||||||
[4, 3, 2]] <-- this is applied to the second batch
|
[4, 3, 2]] <-- this is applied to the second batch
|
||||||
indices_shape = (2, 3)
|
indices_shape = (2, 3)
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ data = [[[[ 1, 2, 3, 4], <-- first batch
|
|||||||
[ 9, 10, 11, 12],
|
[ 9, 10, 11, 12],
|
||||||
[13, 14, 15, 16],
|
[13, 14, 15, 16],
|
||||||
[17, 18, 19, 20]]],
|
[17, 18, 19, 20]]],
|
||||||
|
|
||||||
[[[21, 22, 23, 24], <-- second batch
|
[[[21, 22, 23, 24], <-- second batch
|
||||||
[25, 26, 27, 28],
|
[25, 26, 27, 28],
|
||||||
[29, 30, 31, 32],
|
[29, 30, 31, 32],
|
||||||
@ -119,12 +119,12 @@ Example 5 with negative *batch_dims* value:
|
|||||||
batch_dims = -1 <-- normalized value will be indices.rank + batch_dims = 2 - 1 = 1
|
batch_dims = -1 <-- normalized value will be indices.rank + batch_dims = 2 - 1 = 1
|
||||||
axis = 1
|
axis = 1
|
||||||
|
|
||||||
indices = [[0, 0, 4], <-- this is applied to the first batch
|
indices = [[0, 0, 4], <-- this is applied to the first batch
|
||||||
[4, 0, 0]] <-- this is applied to the second batch
|
[4, 0, 0]] <-- this is applied to the second batch
|
||||||
indices_shape = (2, 3)
|
indices_shape = (2, 3)
|
||||||
|
|
||||||
data = [[1, 2, 3, 4, 5], <-- the first batch
|
data = [[1, 2, 3, 4, 5], <-- the first batch
|
||||||
[6, 7, 8, 9, 10]] <-- the second batch
|
[6, 7, 8, 9, 10]] <-- the second batch
|
||||||
data_shape = (2, 5)
|
data_shape = (2, 5)
|
||||||
|
|
||||||
output = [[ 1, 1, 5],
|
output = [[ 1, 1, 5],
|
||||||
@ -134,21 +134,21 @@ output_shape = (2, 3)
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` tensor of type *T* with arbitrary data. **Required**.
|
* **1**: `data` tensor of type *T* with arbitrary data. **Required.**
|
||||||
|
|
||||||
* **2**: `indices` tensor of type *T_IND* with indices to gather. 0D tensor (scalar) for indices is also allowed.
|
* **2**: `indices` tensor of type *T_IND* with indices to gather. 0D tensor (scalar) for indices is also allowed.
|
||||||
The values for indices are in the range `[0, data[axis] - 1]`.
|
The values for indices are in the range `[0, data[axis] - 1]`.
|
||||||
**Required**.
|
**Required.**
|
||||||
|
|
||||||
* **3**: Scalar or 1D tensor `axis` of *T_AXIS* type is a dimension index to gather data from. For example,
|
* **3**: Scalar or 1D tensor `axis` of *T_AXIS* type is a dimension index to gather data from. For example,
|
||||||
*axis* equal to 1 means that gathering is performed over the first dimension. Negative `axis` means reverse indexing and
|
*axis* equal to 1 means that gathering is performed over the first dimension. Negative `axis` means reverse indexing and
|
||||||
will be normalized to value `axis = data.rank + axis`. Allowed values are from `[-len(data.shape), len(data.shape) - 1]`
|
will be normalized to value `axis = data.rank + axis`. Allowed values are from `[-len(data.shape), len(data.shape) - 1]`
|
||||||
and `axis' >= batch_dims'`. Where `axis'` and `batch_dims'` stand for normalized `batch_dims` and `axis` values.
|
and `axis' >= batch_dims'`. Where `axis'` and `batch_dims'` stand for normalized `batch_dims` and `axis` values.
|
||||||
**Required**.
|
**Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: The resulting tensor of type *T* that consists of elements from `data` tensor gathered by `indices`. The shape
|
* **1**: The resulting tensor of type *T* that consists of elements from `data` tensor gathered by `indices`. The shape
|
||||||
of the output tensor is `data.shape[:axis] + indices.shape[batch_dims:] + data.shape[axis + 1:]`
|
of the output tensor is `data.shape[:axis] + indices.shape[batch_dims:] + data.shape[axis + 1:]`
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
@ -5,22 +5,22 @@
|
|||||||
**Category**: Data movement operations
|
**Category**: Data movement operations
|
||||||
|
|
||||||
**Short description**: *Gather* operation takes slices of data of the first input tensor according to the indices
|
**Short description**: *Gather* operation takes slices of data of the first input tensor according to the indices
|
||||||
specified with the second input tensor and axis from the third input. Semantics of this operation is identical to
|
specified with the second input tensor and axis from the third input. Semantics of this operation is identical to
|
||||||
TensorFlow\* [Gather](https://www.tensorflow.org/api_docs/python/tf/gather) operation.
|
TensorFlow\* [Gather](https://www.tensorflow.org/api_docs/python/tf/gather) operation.
|
||||||
|
|
||||||
**Detailed description**
|
**Detailed description**
|
||||||
|
|
||||||
output[p_0, p_1, ..., p_{axis-1}, i_b, ..., i_{M-1}, p_{axis+1}, ..., p_{N-1}] =
|
output[p_0, p_1, ..., p_{axis-1}, i_b, ..., i_{M-1}, p_{axis+1}, ..., p_{N-1}] =
|
||||||
data[p_0, p_1, ..., p_{axis-1}, indices[p_0, p_1, ..., p_{b-1}, i_b, ..., i_{M-1}], p_{axis+1}, ..., p_{N-1}]
|
data[p_0, p_1, ..., p_{axis-1}, indices[p_0, p_1, ..., p_{b-1}, i_b, ..., i_{M-1}], p_{axis+1}, ..., p_{N-1}]
|
||||||
|
|
||||||
Where `data`, `indices` and `axis` are tensors from first, second and third inputs correspondingly, `b` is
|
Where `data`, `indices` and `axis` are tensors from first, second and third inputs correspondingly, `b` is
|
||||||
the number of batch dimensions. `N` and `M` are numbers of dimensions of `data` and `indices` tensors, respectively.
|
the number of batch dimensions. `N` and `M` are numbers of dimensions of `data` and `indices` tensors, respectively.
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
* *batch_dims*
|
* *batch_dims*
|
||||||
* **Description**: *batch_dims* (also denoted as `b`) is a leading number of dimensions of `data` tensor and `indices`
|
* **Description**: *batch_dims* (also denoted as `b`) is a leading number of dimensions of `data` tensor and `indices`
|
||||||
representing the batches, and *Gather* starts to gather from the `b` dimension. It requires the first `b`
|
representing the batches, and *Gather* starts to gather from the `b` dimension. It requires the first `b`
|
||||||
dimensions in `data` and `indices` tensors to be equal. If `batch_dims` is less than zero, normalized value is used
|
dimensions in `data` and `indices` tensors to be equal. If `batch_dims` is less than zero, normalized value is used
|
||||||
`batch_dims = indices.rank + batch_dims`.
|
`batch_dims = indices.rank + batch_dims`.
|
||||||
* **Range of values**: `[-min(data.rank, indices.rank); min(data.rank, indices.rank)]` and `batch_dims' <= axis'`.
|
* **Range of values**: `[-min(data.rank, indices.rank); min(data.rank, indices.rank)]` and `batch_dims' <= axis'`.
|
||||||
Where `batch_dims'` and `axis'` stand for normalized `batch_dims` and `axis` values.
|
Where `batch_dims'` and `axis'` stand for normalized `batch_dims` and `axis` values.
|
||||||
@ -33,7 +33,7 @@ Example 1 with default *batch_dims* value:
|
|||||||
batch_dims = 0
|
batch_dims = 0
|
||||||
axis = 0
|
axis = 0
|
||||||
|
|
||||||
indices = [0, 0, 4]
|
indices = [0, 0, 4]
|
||||||
data = [1, 2, 3, 4, 5]
|
data = [1, 2, 3, 4, 5]
|
||||||
output = [1, 1, 5]
|
output = [1, 1, 5]
|
||||||
```
|
```
|
||||||
@ -43,12 +43,12 @@ Example 2 with non-default *batch_dims* value:
|
|||||||
batch_dims = 1
|
batch_dims = 1
|
||||||
axis = 1
|
axis = 1
|
||||||
|
|
||||||
indices = [[0, 0, 4], <-- this is applied to the first batch
|
indices = [[0, 0, 4], <-- this is applied to the first batch
|
||||||
[4, 0, 0]] <-- this is applied to the second batch
|
[4, 0, 0]] <-- this is applied to the second batch
|
||||||
indices_shape = (2, 3)
|
indices_shape = (2, 3)
|
||||||
|
|
||||||
data = [[1, 2, 3, 4, 5], <-- the first batch
|
data = [[1, 2, 3, 4, 5], <-- the first batch
|
||||||
[6, 7, 8, 9, 10]] <-- the second batch
|
[6, 7, 8, 9, 10]] <-- the second batch
|
||||||
data_shape = (2, 5)
|
data_shape = (2, 5)
|
||||||
|
|
||||||
output = [[ 1, 1, 5],
|
output = [[ 1, 1, 5],
|
||||||
@ -63,14 +63,14 @@ axis = 2
|
|||||||
|
|
||||||
indices = [[[0, 0, 4], <-- this is applied to the first batch, index = (0, 0)
|
indices = [[[0, 0, 4], <-- this is applied to the first batch, index = (0, 0)
|
||||||
[4, 0, 0]], <-- this is applied to the second batch, index = (0, 1)
|
[4, 0, 0]], <-- this is applied to the second batch, index = (0, 1)
|
||||||
|
|
||||||
[[1, 2, 4], <-- this is applied to the third batch, index = (1, 0)
|
[[1, 2, 4], <-- this is applied to the third batch, index = (1, 0)
|
||||||
[4, 3, 2]]] <-- this is applied to the fourth batch, index = (1, 1)
|
[4, 3, 2]]] <-- this is applied to the fourth batch, index = (1, 1)
|
||||||
indices_shape = (2, 2, 3)
|
indices_shape = (2, 2, 3)
|
||||||
|
|
||||||
data = [[[1, 2, 3, 4, 5], <-- the first batch, index = (0, 0)
|
data = [[[1, 2, 3, 4, 5], <-- the first batch, index = (0, 0)
|
||||||
[6, 7, 8, 9, 10]], <-- the second batch, index = (0, 1)
|
[6, 7, 8, 9, 10]], <-- the second batch, index = (0, 1)
|
||||||
|
|
||||||
[[11, 12, 13, 14, 15], <-- the third batch, index = (1, 0)
|
[[11, 12, 13, 14, 15], <-- the third batch, index = (1, 0)
|
||||||
[16, 17, 18, 19, 20]]] <-- the fourth batch, index = (1, 1)
|
[16, 17, 18, 19, 20]]] <-- the fourth batch, index = (1, 1)
|
||||||
data_shape = (2, 2, 5)
|
data_shape = (2, 2, 5)
|
||||||
@ -79,7 +79,7 @@ output = [[[ 1, 1, 5],
|
|||||||
[10, 6, 6]],
|
[10, 6, 6]],
|
||||||
|
|
||||||
[[12, 13, 15],
|
[[12, 13, 15],
|
||||||
[20, 19, 18]]]
|
[20, 19, 18]]]
|
||||||
output_shape = (2, 2, 3)
|
output_shape = (2, 2, 3)
|
||||||
```
|
```
|
||||||
Example 4 with *axis* > *batch_dims*:
|
Example 4 with *axis* > *batch_dims*:
|
||||||
@ -87,7 +87,7 @@ Example 4 with *axis* > *batch_dims*:
|
|||||||
batch_dims = 1
|
batch_dims = 1
|
||||||
axis = 2
|
axis = 2
|
||||||
|
|
||||||
indices = [[1, 2, 4], <-- this is applied to the first batch
|
indices = [[1, 2, 4], <-- this is applied to the first batch
|
||||||
[4, 3, 2]] <-- this is applied to the second batch
|
[4, 3, 2]] <-- this is applied to the second batch
|
||||||
indices_shape = (2, 3)
|
indices_shape = (2, 3)
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ data = [[[[ 1, 2, 3, 4], <-- first batch
|
|||||||
[ 9, 10, 11, 12],
|
[ 9, 10, 11, 12],
|
||||||
[13, 14, 15, 16],
|
[13, 14, 15, 16],
|
||||||
[17, 18, 19, 20]]],
|
[17, 18, 19, 20]]],
|
||||||
|
|
||||||
[[[21, 22, 23, 24], <-- second batch
|
[[[21, 22, 23, 24], <-- second batch
|
||||||
[25, 26, 27, 28],
|
[25, 26, 27, 28],
|
||||||
[29, 30, 31, 32],
|
[29, 30, 31, 32],
|
||||||
@ -119,12 +119,12 @@ Example 5 with negative *batch_dims* value:
|
|||||||
batch_dims = -1 <-- normalized value will be indices.rank + batch_dims = 2 - 1 = 1
|
batch_dims = -1 <-- normalized value will be indices.rank + batch_dims = 2 - 1 = 1
|
||||||
axis = 1
|
axis = 1
|
||||||
|
|
||||||
indices = [[0, 0, 4], <-- this is applied to the first batch
|
indices = [[0, 0, 4], <-- this is applied to the first batch
|
||||||
[4, 0, 0]] <-- this is applied to the second batch
|
[4, 0, 0]] <-- this is applied to the second batch
|
||||||
indices_shape = (2, 3)
|
indices_shape = (2, 3)
|
||||||
|
|
||||||
data = [[1, 2, 3, 4, 5], <-- the first batch
|
data = [[1, 2, 3, 4, 5], <-- the first batch
|
||||||
[6, 7, 8, 9, 10]] <-- the second batch
|
[6, 7, 8, 9, 10]] <-- the second batch
|
||||||
data_shape = (2, 5)
|
data_shape = (2, 5)
|
||||||
|
|
||||||
output = [[ 1, 1, 5],
|
output = [[ 1, 1, 5],
|
||||||
@ -137,29 +137,29 @@ Example 6 with negative indices:
|
|||||||
batch_dims = 0
|
batch_dims = 0
|
||||||
axis = 0
|
axis = 0
|
||||||
|
|
||||||
indices = [0, -2, -1]
|
indices = [0, -2, -1]
|
||||||
data = [1, 2, 3, 4, 5]
|
data = [1, 2, 3, 4, 5]
|
||||||
output = [1, 4, 5]
|
output = [1, 4, 5]
|
||||||
```
|
```
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` tensor of type *T* with arbitrary data. **Required**.
|
* **1**: `data` tensor of type *T* with arbitrary data. **Required.**
|
||||||
|
|
||||||
* **2**: `indices` tensor of type *T_IND* with indices to gather. 0D tensor (scalar) for indices is also allowed.
|
* **2**: `indices` tensor of type *T_IND* with indices to gather. 0D tensor (scalar) for indices is also allowed.
|
||||||
The values for indices are in the range `[-data[axis], data[axis] - 1]`.
|
The values for indices are in the range `[-data[axis], data[axis] - 1]`.
|
||||||
Negative values of indices indicate reverse indexing from `data[axis]`.
|
Negative values of indices indicate reverse indexing from `data[axis]`.
|
||||||
**Required**.
|
**Required.**
|
||||||
|
|
||||||
* **3**: Scalar or 1D tensor `axis` of *T_AXIS* type is a dimension index to gather data from. For example,
|
* **3**: Scalar or 1D tensor `axis` of *T_AXIS* type is a dimension index to gather data from. For example,
|
||||||
*axis* equal to 1 means that gathering is performed over the first dimension. Negative `axis` means reverse indexing and
|
*axis* equal to 1 means that gathering is performed over the first dimension. Negative `axis` means reverse indexing and
|
||||||
will be normalized to value `axis = data.rank + axis`. Allowed values are from `[-len(data.shape), len(data.shape) - 1]`
|
will be normalized to value `axis = data.rank + axis`. Allowed values are from `[-len(data.shape), len(data.shape) - 1]`
|
||||||
and `axis' >= batch_dims'`. Where `axis'` and `batch_dims'` stand for normalized `batch_dims` and `axis` values.
|
and `axis' >= batch_dims'`. Where `axis'` and `batch_dims'` stand for normalized `batch_dims` and `axis` values.
|
||||||
**Required**.
|
**Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: The resulting tensor of type *T* that consists of elements from `data` tensor gathered by `indices`. The shape
|
* **1**: The resulting tensor of type *T* that consists of elements from `data` tensor gathered by `indices`. The shape
|
||||||
of the output tensor is `data.shape[:axis] + indices.shape[batch_dims:] + data.shape[axis + 1:]`
|
of the output tensor is `data.shape[:axis] + indices.shape[batch_dims:] + data.shape[axis + 1:]`
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
@ -73,13 +73,13 @@ OUTPUT =
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` tensor of arbitrary shape and type *T*. Required.
|
* **1**: `data` tensor of arbitrary shape and type *T*. **Required.**
|
||||||
|
|
||||||
* **2**: `pads_begin` 1D tensor of type *T_INT*. Number of elements matches the number of indices in *data* attribute. Specifies the number of padding elements at the beginning of each axis. Required.
|
* **2**: `pads_begin` 1D tensor of type *T_INT*. Number of elements matches the number of indices in *data* attribute. Specifies the number of padding elements at the beginning of each axis. **Required.**
|
||||||
|
|
||||||
* **3**: `pads_end` 1D tensor of type *T_INT*. Number of elements matches the number of indices in *data* attribute. Specifies the number of padding elements at the ending of each axis. Required.
|
* **3**: `pads_end` 1D tensor of type *T_INT*. Number of elements matches the number of indices in *data* attribute. Specifies the number of padding elements at the ending of each axis. **Required.**
|
||||||
|
|
||||||
* **4**: `pad_value` scalar tensor of type *T*. Used with the `pad_mode = "constant"` only. All new elements are populated with this value or with 0 if input not provided. Shouldn't be set for other `pad_mode` values. Optional.
|
* **4**: `pad_value` scalar tensor of type *T*. Used with the `pad_mode = "constant"` only. All new elements are populated with this value or with 0 if input not provided. Shouldn't be set for other `pad_mode` values. **Optional.**
|
||||||
|
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: tensor with input data to reverse. Required.
|
* **1**: tensor with input data to reverse. **Required.**
|
||||||
|
|
||||||
* **2**: 1D tensor populated with integers with sequence lengths in the 1st input tensor. Required.
|
* **2**: 1D tensor populated with integers with sequence lengths in the 1st input tensor. **Required.**
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
@ -57,4 +57,4 @@
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
Example 1. *Roll* output with `shift` = 1, `axes` = 0:
|
Example 1. *Roll* output with `shift` = 1, `axes` = 0:
|
||||||
|
|
||||||
```
|
```
|
||||||
data = [[ 1, 2, 3],
|
data = [[ 1, 2, 3],
|
||||||
[ 4, 5, 6],
|
[ 4, 5, 6],
|
||||||
[ 7, 8, 9],
|
[ 7, 8, 9],
|
||||||
@ -23,7 +23,7 @@ output = [[10, 11, 12],
|
|||||||
|
|
||||||
Example 2. *Roll* output with `shift` = [-1, 2], `axes` = [0, 1]:
|
Example 2. *Roll* output with `shift` = [-1, 2], `axes` = [0, 1]:
|
||||||
|
|
||||||
```
|
```
|
||||||
data = [[ 1, 2, 3],
|
data = [[ 1, 2, 3],
|
||||||
[ 4, 5, 6],
|
[ 4, 5, 6],
|
||||||
[ 7, 8, 9],
|
[ 7, 8, 9],
|
||||||
@ -36,7 +36,7 @@ output = [[ 5, 6, 4],
|
|||||||
|
|
||||||
Example 3. *Roll* output with `shift` = [1, 2, 1], `axes` = [0, 1, 0]:
|
Example 3. *Roll* output with `shift` = [1, 2, 1], `axes` = [0, 1, 0]:
|
||||||
|
|
||||||
```
|
```
|
||||||
data = [[ 1, 2, 3],
|
data = [[ 1, 2, 3],
|
||||||
[ 4, 5, 6],
|
[ 4, 5, 6],
|
||||||
[ 7, 8, 9],
|
[ 7, 8, 9],
|
||||||
|
@ -18,23 +18,23 @@ output[i][indices[i][j][k]][k] = updates[i][j][k] if axis = 1,
|
|||||||
output[i][j][indices[i][j][k]] = updates[i][j][k] if axis = 2
|
output[i][j][indices[i][j][k]] = updates[i][j][k] if axis = 2
|
||||||
```
|
```
|
||||||
|
|
||||||
`update` tensor dimensions are less or equal to the corresponding `data` tensor dimensions.
|
`update` tensor dimensions are less or equal to the corresponding `data` tensor dimensions.
|
||||||
|
|
||||||
**Attributes**: *ScatterElementsUpdate* does not have attributes.
|
**Attributes**: *ScatterElementsUpdate* does not have attributes.
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `data` tensor of arbitrary rank `r` and of type *T*. Required.
|
* **1**: `data` tensor of arbitrary rank `r` and of type *T*. **Required.**
|
||||||
|
|
||||||
* **2**: `indices` tensor with indices of type *T_IND*. The rank of the tensor is equal to the rank of `data` tensor.
|
* **2**: `indices` tensor with indices of type *T_IND*. The rank of the tensor is equal to the rank of `data` tensor.
|
||||||
All index values are expected to be within bounds `[0, s - 1]` along axis of size `s`. If multiple indices point to the
|
All index values are expected to be within bounds `[0, s - 1]` along axis of size `s`. If multiple indices point to the
|
||||||
same output location then the order of updating the values is undefined. If an index points to non-existing output
|
same output location then the order of updating the values is undefined. If an index points to non-existing output
|
||||||
tensor element or is negative then exception is raised. Required.
|
tensor element or is negative then exception is raised. **Required.**
|
||||||
|
|
||||||
* **3**: `updates` tensor of shape equal to the shape of `indices` tensor and of type *T*. Required.
|
* **3**: `updates` tensor of shape equal to the shape of `indices` tensor and of type *T*. **Required.**
|
||||||
|
|
||||||
* **4**: `axis` tensor with scalar or 1D tensor with one element of type *T_AXIS* specifying axis for scatter.
|
* **4**: `axis` tensor with scalar or 1D tensor with one element of type *T_AXIS* specifying axis for scatter.
|
||||||
The value can be in range `[-r, r - 1]` where `r` is the rank of `data`. Required.
|
The value can be in range `[-r, r - 1]` where `r` is the rank of `data`. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
**Category**: Data movement operations
|
**Category**: Data movement operations
|
||||||
|
|
||||||
**Short description**: Creates a copy of the first input tensor with updated elements specified with second and third input tensors.
|
**Short description**: Creates a copy of the first input tensor with updated elements specified with second and third input tensors.
|
||||||
|
|
||||||
**Detailed description**: The operation produces a copy of `data` tensor and updates its value to values specified
|
**Detailed description**: The operation produces a copy of `data` tensor and updates its value to values specified
|
||||||
by `updates` at specific index positions specified by `indices`. The output shape is the same as the shape of `data`.
|
by `updates` at specific index positions specified by `indices`. The output shape is the same as the shape of `data`.
|
||||||
`indices` tensor must not have duplicate entries. In case of duplicate entries in `indices` the result is undefined.
|
`indices` tensor must not have duplicate entries. In case of duplicate entries in `indices` the result is undefined.
|
||||||
|
|
||||||
The last dimension of `indices` can be at most the rank of `data.shape`.
|
The last dimension of `indices` can be at most the rank of `data.shape`.
|
||||||
The last dimension of `indices` corresponds to indices into elements if `indices.shape[-1]` = `data.shape.rank` or slices
|
The last dimension of `indices` corresponds to indices into elements if `indices.shape[-1]` = `data.shape.rank` or slices
|
||||||
if `indices.shape[-1]` < `data.shape.rank`. `updates` is a tensor with shape `indices.shape[:-1] + data.shape[indices.shape[-1]:]`
|
if `indices.shape[-1]` < `data.shape.rank`. `updates` is a tensor with shape `indices.shape[:-1] + data.shape[indices.shape[-1]:]`
|
||||||
|
|
||||||
Example 1 that shows update of four single elements in `data`:
|
Example 1 that shows update of four single elements in `data`:
|
||||||
@ -44,11 +44,11 @@ output = [[[5, 5, 5, 5], [6, 6, 6, 6], [7, 7, 7, 7], [8, 8, 8, 8]],
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `data` tensor of arbitrary rank `r` >= 1 and of type *T*. Required.
|
* **1**: `data` tensor of arbitrary rank `r` >= 1 and of type *T*. **Required.**
|
||||||
|
|
||||||
* **2**: `indices` tensor with indices of arbitrary rank `q` >= 1 and of type *T_IND*. All index values `i_j` in index entry `(i_0, i_1, ...,i_k)` (where `k = indices.shape[-1]`) must be within bounds `[0, s_j - 1]` where `s_j = data.shape[j]`. `k` must be at most `r`. Required.
|
* **2**: `indices` tensor with indices of arbitrary rank `q` >= 1 and of type *T_IND*. All index values `i_j` in index entry `(i_0, i_1, ...,i_k)` (where `k = indices.shape[-1]`) must be within bounds `[0, s_j - 1]` where `s_j = data.shape[j]`. `k` must be at most `r`. **Required.**
|
||||||
|
|
||||||
* **3**: `updates` tensor of rank `r - indices.shape[-1] + q - 1` of type *T*. If expected `updates` rank is 0D it can be a tensor with single element. Required.
|
* **3**: `updates` tensor of rank `r - indices.shape[-1] + q - 1` of type *T*. If expected `updates` rank is 0D it can be a tensor with single element. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -31,17 +31,17 @@ but allows scattering for the arbitrary axis.
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `data` tensor of arbitrary rank `r` and of type *T*. Required.
|
* **1**: `data` tensor of arbitrary rank `r` and of type *T*. **Required.**
|
||||||
|
|
||||||
* **2**: `indices` tensor with indices of type *T_IND*.
|
* **2**: `indices` tensor with indices of type *T_IND*.
|
||||||
All index values are expected to be within bounds `[0, s - 1]` along axis of size `s`. If multiple indices point to the
|
All index values are expected to be within bounds `[0, s - 1]` along axis of size `s`. If multiple indices point to the
|
||||||
same output location then the order of updating the values is undefined. If an index points to non-existing output
|
same output location then the order of updating the values is undefined. If an index points to non-existing output
|
||||||
tensor element or is negative then an exception is raised. Required.
|
tensor element or is negative then an exception is raised. **Required.**
|
||||||
|
|
||||||
* **3**: `updates` tensor of type *T*. Required.
|
* **3**: `updates` tensor of type *T*. **Required.**
|
||||||
|
|
||||||
* **4**: `axis` tensor with scalar or 1D tensor with one element of type *T_AXIS* specifying axis for scatter.
|
* **4**: `axis` tensor with scalar or 1D tensor with one element of type *T_AXIS* specifying axis for scatter.
|
||||||
The value can be in range `[-r, r - 1]` where `r` is the rank of `data`. Required.
|
The value can be in range `[-r, r - 1]` where `r` is the rank of `data`. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ where `group` is the layer attribute described below.
|
|||||||
* **Range of values**: an integer number in the range `[-rank(data_shape), rank(data_shape) - 1]`
|
* **Range of values**: an integer number in the range `[-rank(data_shape), rank(data_shape) - 1]`
|
||||||
* **Type**: `int`
|
* **Type**: `int`
|
||||||
* **Default value**: 1
|
* **Default value**: 1
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *group*
|
* *group*
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ where `group` is the layer attribute described below.
|
|||||||
* **Range of values**: a positive integer in the range `[1, data_shape[axis]]`
|
* **Range of values**: a positive integer in the range `[1, data_shape[axis]]`
|
||||||
* **Type**: `int`
|
* **Type**: `int`
|
||||||
* **Default value**: 1
|
* **Default value**: 1
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
**Category**: *Data movement*
|
**Category**: *Data movement*
|
||||||
|
|
||||||
**Short description**: The *SpaceToBatch* operation divides "spatial" dimensions `[1, ..., N - 1]` of the `data` input into a grid of blocks of shape `block_shape`, and interleaves these blocks with the batch dimension (0) such that in the output, the spatial dimensions `[1, ..., N - 1]` correspond to the position within the grid, and the batch dimension combines both the position within a spatial block and the original batch position. Prior to division into blocks, the spatial dimensions of the input are optionally zero padded according to `pads_begin` and `pads_end`.
|
**Short description**: The *SpaceToBatch* operation divides "spatial" dimensions `[1, ..., N - 1]` of the `data` input into a grid of blocks of shape `block_shape`, and interleaves these blocks with the batch dimension (0) such that in the output, the spatial dimensions `[1, ..., N - 1]` correspond to the position within the grid, and the batch dimension combines both the position within a spatial block and the original batch position. Prior to division into blocks, the spatial dimensions of the input are optionally zero padded according to `pads_begin` and `pads_end`.
|
||||||
|
|
||||||
**Detailed description**:
|
**Detailed description**:
|
||||||
|
|
||||||
@ -33,10 +33,10 @@ where
|
|||||||
* **2**: `block_shape` - input 1-D tensor of *T2* type with shape `[N]` that is equal to the size of `data` input shape. All values must be >= 1. `block_shape[0]` is expected to be 1. **Required.**
|
* **2**: `block_shape` - input 1-D tensor of *T2* type with shape `[N]` that is equal to the size of `data` input shape. All values must be >= 1. `block_shape[0]` is expected to be 1. **Required.**
|
||||||
* **3**: `pads_begin` - input 1-D tensor of *T2* type with shape `[N]` that is equal to the size of `data` input shape. All values must be non-negative. `pads_begin` specifies the padding for the beginning along each axis of `data` input . It is required that `block_shape[i]` divides `data_shape[i] + pads_begin[i] + pads_end[i]`. `pads_begin[0]` is expected to be 0. **Required.**
|
* **3**: `pads_begin` - input 1-D tensor of *T2* type with shape `[N]` that is equal to the size of `data` input shape. All values must be non-negative. `pads_begin` specifies the padding for the beginning along each axis of `data` input . It is required that `block_shape[i]` divides `data_shape[i] + pads_begin[i] + pads_end[i]`. `pads_begin[0]` is expected to be 0. **Required.**
|
||||||
* **4**: `pads_end` - input 1-D tensor of *T2* type with shape `[N]` that is equal to the size of `data` input shape. All values must be non-negative. `pads_end` specifies the padding for the ending along each axis of `data` input. It is required that `block_shape[i]` divides `data_shape[i] + pads_begin[i] + pads_end[i]`. `pads_end[0]` is expected to be 0. **Required.**
|
* **4**: `pads_end` - input 1-D tensor of *T2* type with shape `[N]` that is equal to the size of `data` input shape. All values must be non-negative. `pads_end` specifies the padding for the ending along each axis of `data` input. It is required that `block_shape[i]` divides `data_shape[i] + pads_begin[i] + pads_end[i]`. `pads_end[0]` is expected to be 0. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: N-D tensor with shape `[batch * block_shape[0] * block_shape[1] * ... * block_shape[N - 1], (D_1 + pads_begin[1] + pads_end[1]) / block_shape[1], (D_2 + pads_begin[2] + pads_end[2]) / block_shape[2], ..., (D_{N -1} + pads_begin[N - 1] + pads_end[N - 1]) / block_shape[N - 1]` of the same type as `data` input.
|
* **1**: N-D tensor with shape `[batch * block_shape[0] * block_shape[1] * ... * block_shape[N - 1], (D_1 + pads_begin[1] + pads_end[1]) / block_shape[1], (D_2 + pads_begin[2] + pads_end[2]) / block_shape[2], ..., (D_{N -1} + pads_begin[N - 1] + pads_end[N - 1]) / block_shape[N - 1]` of the same type as `data` input.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
@ -54,9 +54,9 @@ where
|
|||||||
<dim>10</dim> <!-- spatial dimension 2 -->
|
<dim>10</dim> <!-- spatial dimension 2 -->
|
||||||
<dim>3</dim> <!-- spatial dimension 3 -->
|
<dim>3</dim> <!-- spatial dimension 3 -->
|
||||||
<dim>3</dim> <!-- spatial dimension 4 -->
|
<dim>3</dim> <!-- spatial dimension 4 -->
|
||||||
</port>
|
</port>
|
||||||
<port id="1"> <!-- block_shape value: [1, 2, 4, 3, 1] -->
|
<port id="1"> <!-- block_shape value: [1, 2, 4, 3, 1] -->
|
||||||
<dim>5</dim>
|
<dim>5</dim>
|
||||||
</port>
|
</port>
|
||||||
<port id="2"> <!-- pads_begin value: [0, 0, 1, 0, 0] -->
|
<port id="2"> <!-- pads_begin value: [0, 0, 1, 0, 0] -->
|
||||||
<dim>5</dim>
|
<dim>5</dim>
|
||||||
|
@ -23,7 +23,7 @@ Where D is the rank of input tensor `data`. The sum of elements in `split_length
|
|||||||
|
|
||||||
* **1**: `data`. A tensor of type `T1` and arbitrary shape. **Required.**
|
* **1**: `data`. A tensor of type `T1` and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: `axis`. Axis along `data` to split. A scalar or tensor with shape `[1]` of type `T2` with value from range `-rank(data) .. rank(data)-1`. Negative values address dimensions from the end.
|
* **2**: `axis`. Axis along `data` to split. A scalar or tensor with shape `[1]` of type `T2` with value from range `-rank(data) .. rank(data)-1`. Negative values address dimensions from the end.
|
||||||
**Required.**
|
**Required.**
|
||||||
|
|
||||||
* **3**: `split_lengths`. A list containing the dimension values of each output tensor shape along the split `axis`. A 1D tensor of type `T2`. The number of elements in `split_lengths` determines the number of outputs. The sum of elements in `split_lengths` must match `data.shape[axis]`. In addition `split_lengths` can contain a single `-1` element, which means, all remaining items along specified `axis` that are not consumed by other parts. **Required.**
|
* **3**: `split_lengths`. A list containing the dimension values of each output tensor shape along the split `axis`. A 1D tensor of type `T2`. The number of elements in `split_lengths` determines the number of outputs. The sum of elements in `split_lengths` must match `data.shape[axis]`. In addition `split_lengths` can contain a single `-1` element, which means, all remaining items along specified `axis` that are not consumed by other parts. **Required.**
|
||||||
@ -107,4 +107,4 @@ Where D is the rank of input tensor `data`. The sum of elements in `split_length
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Input tensor with element of any floating point type and `2 <= rank <=4`. Required.
|
* **1**: Input tensor with element of any floating point type and `2 <= rank <=4`. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ o_{i}=\frac{o_{i}}{\sum \sqrt {o_{k}^2}+\epsilon}
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: 4D or 5D input tensor of any floating point type. Required.
|
* **1**: 4D or 5D input tensor of any floating point type. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -53,9 +53,9 @@ o_{i}=\frac{o_{i}}{\sqrt {\sum {o_{k}^2}}+\epsilon}
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` - Input tensor to be normalized. Type *T*. Required.
|
* **1**: `data` - Input tensor to be normalized. Type *T*. **Required.**
|
||||||
|
|
||||||
* **2**: `axes` - 1D tensor which specifies indices of dimensions in `data` that define normalization slices. Allowed range of axes is `[-r; r-1]` where `r = rank(data)`, the order can be not sorted. Negative value means counting dimensions from the back. Type *T_IND*. Required.
|
* **2**: `axes` - 1D tensor which specifies indices of dimensions in `data` that define normalization slices. Allowed range of axes is `[-r; r-1]` where `r = rank(data)`, the order can be not sorted. Negative value means counting dimensions from the back. Type *T_IND*. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ Output(i,j,k) = \frac{Input[d_{start}:d_{end}, h_{start}:h_{end}, w_{start}:w_{e
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 3D, 4D, or 5D input tensor of shape `[N, C, H]`, `[N, C, H, W]` or `[N, C, D, H, W]` and type *T*. Required.
|
* **1**: 3D, 4D, or 5D input tensor of shape `[N, C, H]`, `[N, C, H, W]` or `[N, C, D, H, W]` and type *T*. **Required.**
|
||||||
* **2**: 1D tensor describing output shape for spatial dimensions. Can be `[H_out]` for 3D input, `[H_out, W_out]` for 4D input, `[D_out, H_out, W_out]` for 5D input and of type *T_SHAPE*. Required.
|
* **2**: 1D tensor describing output shape for spatial dimensions. Can be `[H_out]` for 3D input, `[H_out, W_out]` for 4D input, `[D_out, H_out, W_out]` for 5D input and of type *T_SHAPE*. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ Output(i,j,k) = \frac{Input[d_{start}:d_{end}, h_{start}:h_{end}, w_{start}:w_{e
|
|||||||
```xml
|
```xml
|
||||||
<layer ... type="AdaptiveAvgPool" ... >
|
<layer ... type="AdaptiveAvgPool" ... >
|
||||||
<data output_type="i64"/>
|
<data output_type="i64"/>
|
||||||
<input>
|
<input>
|
||||||
<port id="0">
|
<port id="0">
|
||||||
<dim>1</dim>
|
<dim>1</dim>
|
||||||
<dim>3</dim>
|
<dim>3</dim>
|
||||||
@ -53,7 +53,7 @@ Output(i,j,k) = \frac{Input[d_{start}:d_{end}, h_{start}:h_{end}, w_{start}:w_{e
|
|||||||
<dim>32</dim>
|
<dim>32</dim>
|
||||||
</port>
|
</port>
|
||||||
</input>
|
</input>
|
||||||
<input>
|
<input>
|
||||||
<port id="1">
|
<port id="1">
|
||||||
<dim>2</dim>
|
<dim>2</dim>
|
||||||
</port>
|
</port>
|
||||||
|
@ -34,12 +34,12 @@ Output(i,j,k) = max(Input[d_{start}:d_{end}, h_{start}:h_{end}, w_{start}:w_{end
|
|||||||
* **Range of values**: "i64" or "i32"
|
* **Range of values**: "i64" or "i32"
|
||||||
* **Type**: string
|
* **Type**: string
|
||||||
* **Default value**: "i64"
|
* **Default value**: "i64"
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 3D, 4D, or 5D input tensor of shape `[N, C, H]`, `[N, C, H, W]` or `[N, C, D, H, W]` and type *T*. Required.
|
* **1**: 3D, 4D, or 5D input tensor of shape `[N, C, H]`, `[N, C, H, W]` or `[N, C, D, H, W]` and type *T*. **Required.**
|
||||||
* **2**: 1D tensor describing output shape for spatial dimensions. Can be `[H_out]` for 3D input, `[H_out, W_out]` for 4D input, `[D_out, H_out, W_out]` for 5D input and of type *T_SHAPE*. Required.
|
* **2**: 1D tensor describing output shape for spatial dimensions. Can be `[H_out]` for 3D input, `[H_out, W_out]` for 4D input, `[D_out, H_out, W_out]` for 5D input and of type *T_SHAPE*. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ Output(i,j,k) = max(Input[d_{start}:d_{end}, h_{start}:h_{end}, w_{start}:w_{end
|
|||||||
```xml
|
```xml
|
||||||
<layer ... type="AdaptiveMaxPool" ... >
|
<layer ... type="AdaptiveMaxPool" ... >
|
||||||
<data output_type="i64"/>
|
<data output_type="i64"/>
|
||||||
<input>
|
<input>
|
||||||
<port id="0">
|
<port id="0">
|
||||||
<dim>1</dim>
|
<dim>1</dim>
|
||||||
<dim>3</dim>
|
<dim>3</dim>
|
||||||
@ -64,7 +64,7 @@ Output(i,j,k) = max(Input[d_{start}:d_{end}, h_{start}:h_{end}, w_{start}:w_{end
|
|||||||
<dim>32</dim>
|
<dim>32</dim>
|
||||||
</port>
|
</port>
|
||||||
</input>
|
</input>
|
||||||
<input>
|
<input>
|
||||||
<port id="1">
|
<port id="1">
|
||||||
<dim>2</dim>
|
<dim>2</dim>
|
||||||
</port>
|
</port>
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 3D, 4D or 5D input tensor. Required.
|
* **1**: 3D, 4D or 5D input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
* **1**: Input shape can be either `[N,C,H]`, `[N,C,H,W]` or `[N,C,H,W,D]`. Then the corresponding output shape is `[N,C,H_out]`, `[N,C,H_out,W_out]` or `[N,C,H_out,W_out,D_out]`.
|
* **1**: Input shape can be either `[N,C,H]`, `[N,C,H,W]` or `[N,C,H,W,D]`. Then the corresponding output shape is `[N,C,H_out]`, `[N,C,H_out,W_out]` or `[N,C,H_out,W_out,D_out]`.
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: 3D, 4D or 5D input tensor of type *T*. Required.
|
* **1**: 3D, 4D or 5D input tensor of type *T*. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
* **1**: Input shape can be either `[N, C, H]`, `[N, C, H, W]` or `[N, C, H, W, D]`. Then the corresponding output shape will be `[N, C, H_out]`, `[N, C, H_out, W_out]` or `[N, C, H_out, W_out, D_out]`. Output tensor has the same data type as input tensor.
|
* **1**: Input shape can be either `[N, C, H]`, `[N, C, H, W]` or `[N, C, H, W, D]`. Then the corresponding output shape will be `[N, C, H_out]`, `[N, C, H_out, W_out]` or `[N, C, H_out, W_out, D_out]`. Output tensor has the same data type as input tensor.
|
||||||
|
@ -36,29 +36,34 @@ else:
|
|||||||
* **Description**: specifies rules used for auto-broadcasting of input tensors.
|
* **Description**: specifies rules used for auto-broadcasting of input tensors.
|
||||||
* **Range of values**:
|
* **Range of values**:
|
||||||
* *none* - no auto-broadcasting is allowed, all input shapes should match
|
* *none* - no auto-broadcasting is allowed, all input shapes should match
|
||||||
* *numpy* - numpy broadcasting rules, aligned with ONNX Broadcasting. Description is available in <a href="https://github.com/onnx/onnx/blob/master/docs/Broadcasting.md">ONNX docs</a>
|
* *numpy* - numpy broadcasting rules, description is available in [Broadcast Rules For Elementwise Operations](../broadcast_rules.md),
|
||||||
* *pdpd* - PaddlePaddle-style implicit broadcasting.
|
* *pdpd* - PaddlePaddle-style implicit broadcasting, description is available in [Broadcast Rules For Elementwise Operations](../broadcast_rules.md).
|
||||||
* **Type**: string
|
* **Type**: string
|
||||||
* **Default value**: "numpy"
|
* **Default value**: "numpy"
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `X` - multidimensional input tensor of floating type to be quantized. Required.
|
* **1**: `X` - tensor of type *T_F* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: `input_low` - minimum limit for input value. The shape must be broadcastable to the shape of *X*. Required.
|
* **2**: `input_low` - tensor of type *T_F* with minimum limit for input value. The shape must be broadcastable to the shape of *X*. **Required.**
|
||||||
|
|
||||||
* **3**: `input_high` - maximum limit for input value. Can be the same as `input_low` for binarization. The shape must be broadcastable to the shape of *X*. Required.
|
* **3**: `input_high` - tensor of type *T_F* with maximum limit for input value. Can be the same as `input_low` for binarization. The shape must be broadcastable to the shape of *X*. **Required.**
|
||||||
|
|
||||||
* **4**: `output_low` - minimum quantized value. The shape must be broadcastable to the shape of *X*. Required.
|
* **4**: `output_low` - tensor of type *T_F* with minimum quantized value. The shape must be broadcastable to the shape of *X*. **Required.**
|
||||||
|
|
||||||
* **5**: `output_high` - maximum quantized value. The shape must be broadcastable to the of *X*. Required.
|
* **5**: `output_high` - tensor of type *T_F* with maximum quantized value. The shape must be broadcastable to the of *X*. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
* **1**: `Y` - resulting tensor with shape and type matching the 1st input tensor *X*.
|
* **1**: output tensor of type *T_F* with shape and type matching the 1st input tensor *X*.
|
||||||
|
|
||||||
|
**Types**
|
||||||
|
|
||||||
|
* *T_F*: any supported floating point type.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<layer … type="FakeQuantize"…>
|
<layer … type="FakeQuantize"…>
|
||||||
<data levels="2"/>
|
<data levels="2"/>
|
||||||
|
@ -17,7 +17,7 @@ where indices i0, ..., iN run through all valid indices for input `data`, and fi
|
|||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, *ReduceL1* corresponds to the identity operation.
|
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.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
@ -141,4 +141,4 @@ Particular cases:
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -17,7 +17,7 @@ where indices i0, ..., iN run through all valid indices for input `data`, and fi
|
|||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, *ReduceL2* corresponds to the identity operation.
|
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.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
@ -141,4 +141,4 @@ Particular cases:
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -17,7 +17,7 @@ where indices i0, ..., iN run through all valid indices for input `data`, and *l
|
|||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, *ReduceLogicalAnd* corresponds to the identity operation.
|
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.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
@ -141,4 +141,4 @@ Particular cases:
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -17,7 +17,7 @@ where indices i0, ..., iN run through all valid indices for input `data`, and *l
|
|||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, *ReduceLogicalOr* corresponds to the identity operation.
|
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.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
@ -141,4 +141,4 @@ Particular cases:
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -17,7 +17,7 @@ where indices i0, ..., iN run through all valid indices for input `data`, and fi
|
|||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, *ReduceMax* corresponds to the identity operation.
|
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.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
@ -141,4 +141,4 @@ Particular cases:
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -17,8 +17,8 @@ where indices i0, ..., iN run through all valid indices for input `data`, and fi
|
|||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, *ReduceMean* corresponds to the identity operation.
|
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.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
@ -141,4 +141,4 @@ Particular cases:
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -17,7 +17,7 @@ where indices i0, ..., iN run through all valid indices for input `data`, and fi
|
|||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, *ReduceMin* corresponds to the identity operation.
|
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.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
@ -141,4 +141,4 @@ Particular cases:
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -17,8 +17,8 @@ where indices i0, ..., iN run through all valid indices for input `data`, and mu
|
|||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, *ReduceProd* corresponds to the identity operation.
|
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.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
@ -141,4 +141,4 @@ Particular cases:
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -17,8 +17,8 @@ where indices i0, ..., iN run through all valid indices for input `data`, and su
|
|||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, *ReduceSum* corresponds to the identity operation.
|
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.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
@ -141,4 +141,4 @@ Particular cases:
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -29,7 +29,7 @@ The main difference between [CTCGreedyDecoder](CTCGreedyDecoder_1.md) and CTCGre
|
|||||||
* **Range of values**: true or false
|
* **Range of values**: true or false
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: true
|
* **Default value**: true
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *classes_index_type*
|
* *classes_index_type*
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ The main difference between [CTCGreedyDecoder](CTCGreedyDecoder_1.md) and CTCGre
|
|||||||
* **Range of values**: "i64" or "i32"
|
* **Range of values**: "i64" or "i32"
|
||||||
* **Type**: string
|
* **Type**: string
|
||||||
* **Default value**: "i32"
|
* **Default value**: "i32"
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *sequence_length_type*
|
* *sequence_length_type*
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ The main difference between [CTCGreedyDecoder](CTCGreedyDecoder_1.md) and CTCGre
|
|||||||
* **Range of values**: "i64" or "i32"
|
* **Range of values**: "i64" or "i32"
|
||||||
* **Type**: string
|
* **Type**: string
|
||||||
* **Default value**: "i32"
|
* **Default value**: "i32"
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ The main difference between [CTCGreedyDecoder](CTCGreedyDecoder_1.md) and CTCGre
|
|||||||
|
|
||||||
* **2**: `sequence_length` - input tensor of type *T_I* of shape `[N]` with sequence lengths. The values of sequence length must be less or equal to `T`. **Required.**
|
* **2**: `sequence_length` - input tensor of type *T_I* of shape `[N]` with sequence lengths. The values of sequence length must be less or equal to `T`. **Required.**
|
||||||
|
|
||||||
* **3**: `blank_index` - scalar or 1D tensor with 1 element of type *T_I*. Specifies the class index to use for the blank class. Regardless of the value of `merge_repeated` attribute, if the output index for a given batch and time step corresponds to the `blank_index`, no new element is emitted. Default value is `C-1`. **Optional**.
|
* **3**: `blank_index` - scalar or 1D tensor with 1 element of type *T_I*. Specifies the class index to use for the blank class. Regardless of the value of `merge_repeated` attribute, if the output index for a given batch and time step corresponds to the `blank_index`, no new element is emitted. Default value is `C-1`. **Optional.**
|
||||||
|
|
||||||
**Output**
|
**Output**
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ The decoding extracts substring of length `label_length[i]` from a target `G`, m
|
|||||||
finds unique elements in the order of character occurrence in case *unique* equal to true.
|
finds unique elements in the order of character occurrence in case *unique* equal to true.
|
||||||
The decoding merges repeated characters in `S` in case *ctc_merge_repeated* equal to true and removes blank characters represented by `blank_index`.
|
The decoding merges repeated characters in `S` in case *ctc_merge_repeated* equal to true and removes blank characters represented by `blank_index`.
|
||||||
By default, `blank_index` is equal to `C-1`, where `C` is a number of classes including the blank.
|
By default, `blank_index` is equal to `C-1`, where `C` is a number of classes including the blank.
|
||||||
For example, in case default *ctc_merge_repeated*, *preprocess_collapse_repeated*, *unique* and `blank_index` a target sequence `G=(0,3,2,2,2,2,2,4,3)` of a length `label_length[i]=4` is processed
|
For example, in case default *ctc_merge_repeated*, *preprocess_collapse_repeated*, *unique* and `blank_index` a target sequence `G=(0,3,2,2,2,2,2,4,3)` of a length `label_length[i]=4` is processed
|
||||||
to `(0,3,2,2)` and a path `S=(0,0,4,3,2,2,4,2,4)` of a length `logit_length[i]=9` is also processed to `(0,3,2,2)`, where `C=5`.
|
to `(0,3,2,2)` and a path `S=(0,0,4,3,2,2,4,2,4)` of a length `logit_length[i]=9` is also processed to `(0,3,2,2)`, where `C=5`.
|
||||||
There exist other paths that are also aligned with `G`, for instance, `0,4,3,3,2,4,2,2,2`. Paths checked for alignment with a target `label[:,i]` must be of length `logit_length[i] = L_i`.
|
There exist other paths that are also aligned with `G`, for instance, `0,4,3,3,2,4,2,2,2`. Paths checked for alignment with a target `label[:,i]` must be of length `logit_length[i] = L_i`.
|
||||||
Compute probabilities of these aligned paths (alignments) as follows:
|
Compute probabilities of these aligned paths (alignments) as follows:
|
||||||
@ -80,15 +80,15 @@ Having log-probabilities for aligned paths, log of summed up probabilities for t
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `logits` - Input tensor with a batch of sequences of logits. Type of elements is *T_F*. Shape of the tensor is `[N, T, C]`, where `N` is the batch size, `T` is the maximum sequence length and `C` is the number of classes including the blank. Required.
|
* **1**: `logits` - Input tensor with a batch of sequences of logits. Type of elements is *T_F*. Shape of the tensor is `[N, T, C]`, where `N` is the batch size, `T` is the maximum sequence length and `C` is the number of classes including the blank. **Required.**
|
||||||
|
|
||||||
* **2**: `logit_length` - 1D input tensor of type *T1* and of a shape `[N]`. The tensor must consist of non-negative values not greater than `T`. Lengths of input sequences of logits `logits[i,:,:]`. Required.
|
* **2**: `logit_length` - 1D input tensor of type *T1* and of a shape `[N]`. The tensor must consist of non-negative values not greater than `T`. Lengths of input sequences of logits `logits[i,:,:]`. **Required.**
|
||||||
|
|
||||||
* **3**: `labels` - 2D tensor with shape `[N, T]` of type *T2*. A length of a target sequence `labels[i,:]` is equal to `label_length[i]` and must contain of integers from a range `[0; C-1]` except `blank_index`. Required.
|
* **3**: `labels` - 2D tensor with shape `[N, T]` of type *T2*. A length of a target sequence `labels[i,:]` is equal to `label_length[i]` and must contain of integers from a range `[0; C-1]` except `blank_index`. **Required.**
|
||||||
|
|
||||||
* **4**: `label_length` - 1D tensor of type *T1* and of a shape `[N]`. The tensor must consist of non-negative values not greater than `T` and `label_length[i] <= logit_length[i]` for all possible `i`. Required.
|
* **4**: `label_length` - 1D tensor of type *T1* and of a shape `[N]`. The tensor must consist of non-negative values not greater than `T` and `label_length[i] <= logit_length[i]` for all possible `i`. **Required.**
|
||||||
|
|
||||||
* **5**: `blank_index` - Scalar of type *T2*. Set the class index to use for the blank label. Default value is `C-1`. Optional.
|
* **5**: `blank_index` - Scalar of type *T2*. Set the class index to use for the blank label. Default value is `C-1`. **Optional.**
|
||||||
|
|
||||||
**Output**
|
**Output**
|
||||||
|
|
||||||
|
@ -31,10 +31,10 @@ The types of input scalars `on_value` and `off_value` should match and be equal
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `indices`: input tensor of type *T1* with non-negative indices, behavior for negative indices is undefined. Can be 0D. Required.
|
* **1**: `indices`: input tensor of type *T1* with non-negative indices, behavior for negative indices is undefined. Can be 0D. **Required.**
|
||||||
* **2**: `depth`: positive scalar (0D tensor) of type *T1* that specifies the number of classes and thus the size of the one-hot dimension. Required.
|
* **2**: `depth`: positive scalar (0D tensor) of type *T1* that specifies the number of classes and thus the size of the one-hot dimension. **Required.**
|
||||||
* **3**: `on_value`: scalar (0D tensor) of type *T2* that fills the locations in output tensor specified in `indices`. Required.
|
* **3**: `on_value`: scalar (0D tensor) of type *T2* that fills the locations in output tensor specified in `indices`. **Required.**
|
||||||
* **4**: `off_value`: scalar (0D tensor) of type *T2* that fills the locations not represented in `indices`. Required.
|
* **4**: `off_value`: scalar (0D tensor) of type *T2* that fills the locations not represented in `indices`. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ If `special_zero` is set to `true` index of `0` cannot be larger than the rank o
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `data` a tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: `data` a tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: `shape` 1D tensor of type *T_SHAPE* describing output shape. **Required**.
|
* **2**: `shape` 1D tensor of type *T_SHAPE* describing output shape. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Arbitrary input tensor. Required.
|
* **1**: Arbitrary input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
@ -34,4 +34,4 @@
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
* **Range of values**: "i64" or "i32"
|
* **Range of values**: "i64" or "i32"
|
||||||
* **Type**: string
|
* **Type**: string
|
||||||
* **Default value**: "i64"
|
* **Default value**: "i64"
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Arbitrary input tensor of type *T*. Required.
|
* **1**: Arbitrary input tensor of type *T*. **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
@ -49,4 +49,4 @@
|
|||||||
</port>
|
</port>
|
||||||
</output>
|
</output>
|
||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Multidimensional input tensor of type *T*. **Required**.
|
* **1**: Multidimensional input tensor of type *T*. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_INT* with indices of dimensions to squeeze. Values could be negative (have to be from range `[-R, R-1]`, where `R` is the rank of the first input). **Optional**.
|
* **2**: Scalar or 1D tensor of type *T_INT* with indices of dimensions to squeeze. Values could be negative (have to be from range `[-R, R-1]`, where `R` is the rank of the first input). **Optional.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
@ -55,7 +55,7 @@
|
|||||||
</layer>
|
</layer>
|
||||||
```
|
```
|
||||||
|
|
||||||
*Example 2: squeeze 1D tensor with 1 element to a 0D tensor (constant)*
|
*Example 2: squeeze 1D tensor with 1 element to a 0D tensor (constant)*
|
||||||
```xml
|
```xml
|
||||||
<layer ... type="Squeeze">
|
<layer ... type="Squeeze">
|
||||||
<input>
|
<input>
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: Tensor of type *T* and arbitrary shape. **Required**.
|
* **1**: Tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_INT* with indices of dimensions to unsqueeze. Values could be negative (have to be from range `[-R, R-1]`, where `R` is the rank of the output). **Required**.
|
* **2**: Scalar or 1D tensor of type *T_INT* with indices of dimensions to unsqueeze. Values could be negative (have to be from range `[-R, R-1]`, where `R` is the rank of the output). **Required.**
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` - Input tensor of type *T* with data for the DFT transformation. Type of elements is any supported floating-point type. The last dimension of the input tensor must be equal to 2, that is the input tensor shape must have the form `[D_0, D_1, ..., D_{N-1}, 2]`, representing the real and imaginary components of complex numbers in `[:, ..., :, 0]` and in `[:, ..., :, 1]` correspondingly. Required.
|
* **1**: `data` - Input tensor of type *T* with data for the DFT transformation. Type of elements is any supported floating-point type. The last dimension of the input tensor must be equal to 2, that is the input tensor shape must have the form `[D_0, D_1, ..., D_{N-1}, 2]`, representing the real and imaginary components of complex numbers in `[:, ..., :, 0]` and in `[:, ..., :, 1]` correspondingly. **Required.**
|
||||||
* **2**: `axes` - 1D tensor of type *T_IND* specifying dimension indices where DFT is applied, and `axes` is any unordered list of indices of different dimensions of input tensor, for example, `[0, 4]`, `[4, 0]`, `[4, 2, 1]`, `[1, 2, 3]`, `[-3, 0, -2]`. These indices should be integers from `-(r - 1)` to `(r - 2)` inclusively, where `r = rank(data)`. A negative axis `a` is interpreted as an axis `r - 1 + a`. Other dimensions do not change. The order of elements in `axes` attribute matters, and is mapped directly to elements in the third input `signal_size`. Required.
|
* **2**: `axes` - 1D tensor of type *T_IND* specifying dimension indices where DFT is applied, and `axes` is any unordered list of indices of different dimensions of input tensor, for example, `[0, 4]`, `[4, 0]`, `[4, 2, 1]`, `[1, 2, 3]`, `[-3, 0, -2]`. These indices should be integers from `-(r - 1)` to `(r - 2)` inclusively, where `r = rank(data)`. A negative axis `a` is interpreted as an axis `r - 1 + a`. Other dimensions do not change. The order of elements in `axes` attribute matters, and is mapped directly to elements in the third input `signal_size`. **Required.**
|
||||||
* **NOTE**: The following constraint must be satisfied: `rank(data) >= len(axes) + 1 and input_shape[-1] == 2 and (rank(data) - 1) not in axes and (-1) not in axes`.
|
* **NOTE**: The following constraint must be satisfied: `rank(data) >= len(axes) + 1 and input_shape[-1] == 2 and (rank(data) - 1) not in axes and (-1) not in axes`.
|
||||||
* **3**: `signal_size` - 1D tensor of type *T_SIZE* describing signal size with respect to axes from the input `axes`. If `signal_size[i] == -1`, then DFT is calculated for full size of the axis `axes[i]`. If `signal_size[i] > input_shape[: r - 1][axes[i]]`, then input data are zero-padded with respect to the axis `axes[i]` at the end. Finally, `signal_size[i] < input_shape[: r - 1][axes[i]]`, then input data are trimmed with respect to the axis `axes[i]`. More precisely, if `signal_size[i] < input_shape[: r - 1][axes[i]]`, the slice `0: signal_size[i]` of the axis `axes[i]` is considered. Optional, with default value `[input_shape[: r - 1][a] for a in axes]`.
|
* **3**: `signal_size` - 1D tensor of type *T_SIZE* describing signal size with respect to axes from the input `axes`. If `signal_size[i] == -1`, then DFT is calculated for full size of the axis `axes[i]`. If `signal_size[i] > input_shape[: r - 1][axes[i]]`, then input data are zero-padded with respect to the axis `axes[i]` at the end. Finally, `signal_size[i] < input_shape[: r - 1][axes[i]]`, then input data are trimmed with respect to the axis `axes[i]`. More precisely, if `signal_size[i] < input_shape[: r - 1][axes[i]]`, the slice `0: signal_size[i]` of the axis `axes[i]` is considered. Optional, with default value `[input_shape[: r - 1][a] for a in axes]`.
|
||||||
* **NOTE**: If the input `signal_size` is specified, the size of `signal_size` must be the same as the size of `axes`.
|
* **NOTE**: If the input `signal_size` is specified, the size of `signal_size` must be the same as the size of `axes`.
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` - Input tensor of type *T* with data for the IDFT transformation. Type of elements is any supported floating-point type. The last dimension of the input tensor must be equal to 2, that is the input tensor shape must have the form `[D_0, D_1, ..., D_{N-1}, 2]`, representing the real and imaginary components of complex numbers in `[:, ..., :, 0]` and in `[:, ..., :, 1]` correspondingly. Required.
|
* **1**: `data` - Input tensor of type *T* with data for the IDFT transformation. Type of elements is any supported floating-point type. The last dimension of the input tensor must be equal to 2, that is the input tensor shape must have the form `[D_0, D_1, ..., D_{N-1}, 2]`, representing the real and imaginary components of complex numbers in `[:, ..., :, 0]` and in `[:, ..., :, 1]` correspondingly. **Required.**
|
||||||
* **2**: **2**: `axes` - 1D tensor of type *T_IND* specifying dimension indices where IDFT is applied, and `axes` is any unordered list of indices of different dimensions of input tensor, for example, `[0, 4]`, `[4, 0]`, `[4, 2, 1]`, `[1, 2, 3]`, `[-3, 0, -2]`. These indices should be integers from `-(r - 1)` to `(r - 2)` inclusively, where `r = rank(data)`. A negative axis `a` is interpreted as an axis `r - 1 + a`. Other dimensions do not change. The order of elements in `axes` attribute matters, and is mapped directly to elements in the third input `signal_size`. Required.
|
* **2**: **2**: `axes` - 1D tensor of type *T_IND* specifying dimension indices where IDFT is applied, and `axes` is any unordered list of indices of different dimensions of input tensor, for example, `[0, 4]`, `[4, 0]`, `[4, 2, 1]`, `[1, 2, 3]`, `[-3, 0, -2]`. These indices should be integers from `-(r - 1)` to `(r - 2)` inclusively, where `r = rank(data)`. A negative axis `a` is interpreted as an axis `r - 1 + a`. Other dimensions do not change. The order of elements in `axes` attribute matters, and is mapped directly to elements in the third input `signal_size`. **Required.**
|
||||||
* **NOTE**: The following constraint must be satisfied: `rank(data) >= len(axes) + 1 and input_shape[-1] == 2 and (rank(data) - 1) not in axes and (-1) not in axes`.
|
* **NOTE**: The following constraint must be satisfied: `rank(data) >= len(axes) + 1 and input_shape[-1] == 2 and (rank(data) - 1) not in axes and (-1) not in axes`.
|
||||||
* **3**: `signal_size` - 1D tensor of type *T_SIZE* describing signal size with respect to axes from the input `axes`. If `signal_size[i] == -1`, then IDFT is calculated for full size of the axis `axes[i]`. If `signal_size[i] > input_shape[: r - 1][axes[i]]`, then input data are zero-padded with respect to the axis `axes[i]` at the end. Finally, if `signal_size[i] < input_shape[: r - 1][axes[i]]`, then input data are trimmed with respect to the axis `axes[i]`. More precisely, if `signal_size[i] < input_shape[: r - 1][axes[i]]`, the slice `0: signal_size[i]` of the axis `axes[i]` is considered. Optional, with default value `[input_shape[: r - 1][a] for a in axes]`.
|
* **3**: `signal_size` - 1D tensor of type *T_SIZE* describing signal size with respect to axes from the input `axes`. If `signal_size[i] == -1`, then IDFT is calculated for full size of the axis `axes[i]`. If `signal_size[i] > input_shape[: r - 1][axes[i]]`, then input data are zero-padded with respect to the axis `axes[i]` at the end. Finally, if `signal_size[i] < input_shape[: r - 1][axes[i]]`, then input data are trimmed with respect to the axis `axes[i]`. More precisely, if `signal_size[i] < input_shape[: r - 1][axes[i]]`, the slice `0: signal_size[i]` of the axis `axes[i]` is considered. Optional, with default value `[input_shape[: r - 1][a] for a in axes]`.
|
||||||
* **NOTE**: If the input `signal_size` is specified, then the size of `signal_size` must be the same as the size of `axes`.
|
* **NOTE**: If the input `signal_size` is specified, then the size of `signal_size` must be the same as the size of `axes`.
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
**Category**: Sort
|
**Category**: Sort
|
||||||
|
|
||||||
**Short description**: The *ExperimentalDetectronTopKROIs* operation is TopK operation applied to probabilities of input
|
**Short description**: The *ExperimentalDetectronTopKROIs* operation is TopK operation applied to probabilities of input
|
||||||
ROIs.
|
ROIs.
|
||||||
|
|
||||||
**Detailed description**: The operation performs probabilities descending sorting for input ROIs and returns *max_rois*
|
**Detailed description**: The operation performs probabilities descending sorting for input ROIs and returns *max_rois*
|
||||||
number of ROIs. Order of sorted ROIs with equal probabilities is undefined. If the number of ROIs is less than *max_rois*
|
number of ROIs. Order of sorted ROIs with equal probabilities is undefined. If the number of ROIs is less than *max_rois*
|
||||||
then operation returns all ROIs descended sorted and the output tensor is filled with undefined values for the rest of
|
then operation returns all ROIs descended sorted and the output tensor is filled with undefined values for the rest of
|
||||||
output tensor elements.
|
output tensor elements.
|
||||||
|
|
||||||
**Attributes**:
|
**Attributes**:
|
||||||
@ -24,7 +24,7 @@ output tensor elements.
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: A 2D tensor of type *T* with shape `[number_of_ROIs, 4]` describing the ROIs as 4-tuples:
|
* **1**: A 2D tensor of type *T* with shape `[number_of_ROIs, 4]` describing the ROIs as 4-tuples:
|
||||||
[x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>]. **Required.**
|
[x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>]. **Required.**
|
||||||
|
|
||||||
* **2**: A 1D tensor of type *T* with shape `[number_of_input_ROIs]` contains probabilities for input ROIs. **Required.**
|
* **2**: A 1D tensor of type *T* with shape `[number_of_input_ROIs]` contains probabilities for input ROIs. **Required.**
|
||||||
|
@ -32,7 +32,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* *none* - do not guarantee the order.
|
* *none* - do not guarantee the order.
|
||||||
* **Type**: `string`
|
* **Type**: `string`
|
||||||
* **Default value**: `none`
|
* **Default value**: `none`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *sort_result_across_batch*
|
* *sort_result_across_batch*
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* *false* - do not sort selected boxes across batches (boxes are sorted per batch element).
|
* *false* - do not sort selected boxes across batches (boxes are sorted per batch element).
|
||||||
* **Type**: boolean
|
* **Type**: boolean
|
||||||
* **Default value**: false
|
* **Default value**: false
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *output_type*
|
* *output_type*
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* **Range of values**: `i64` or `i32`
|
* **Range of values**: `i64` or `i32`
|
||||||
* **Type**: `string`
|
* **Type**: `string`
|
||||||
* **Default value**: `i64`
|
* **Default value**: `i64`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *score_threshold*
|
* *score_threshold*
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* **Range of values**: a floating-point number
|
* **Range of values**: a floating-point number
|
||||||
* **Type**: `float`
|
* **Type**: `float`
|
||||||
* **Default value**: `0`
|
* **Default value**: `0`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *nms_top_k*
|
* *nms_top_k*
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* **Range of values**: an integer
|
* **Range of values**: an integer
|
||||||
* **Type**: `int`
|
* **Type**: `int`
|
||||||
* **Default value**: `-1` meaning to keep all boxes
|
* **Default value**: `-1` meaning to keep all boxes
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *keep_top_k*
|
* *keep_top_k*
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* **Range of values**: an integer
|
* **Range of values**: an integer
|
||||||
* **Type**: `int`
|
* **Type**: `int`
|
||||||
* **Default value**: `-1` meaning to keep all boxes
|
* **Default value**: `-1` meaning to keep all boxes
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *background_class*
|
* *background_class*
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* **Range of values**: an integer
|
* **Range of values**: an integer
|
||||||
* **Type**: `int`
|
* **Type**: `int`
|
||||||
* **Default value**: `-1` meaning to keep all classes
|
* **Default value**: `-1` meaning to keep all classes
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *normalized*
|
* *normalized*
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* *false* - the box coordinates are not normalized.
|
* *false* - the box coordinates are not normalized.
|
||||||
* **Type**: boolean
|
* **Type**: boolean
|
||||||
* **Default value**: True
|
* **Default value**: True
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *decay_function*
|
* *decay_function*
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* **Range of values**: `gaussian`, `linear`
|
* **Range of values**: `gaussian`, `linear`
|
||||||
* **Type**: `string`
|
* **Type**: `string`
|
||||||
* **Default value**: `linear`
|
* **Default value**: `linear`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *gaussian_sigma*
|
* *gaussian_sigma*
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* **Range of values**: a floating-point number
|
* **Range of values**: a floating-point number
|
||||||
* **Type**: `float`
|
* **Type**: `float`
|
||||||
* **Default value**: `2.0`
|
* **Default value**: `2.0`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *post_threshold*
|
* *post_threshold*
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ The Matrix NMS algorithm is described below:
|
|||||||
* **Range of values**: a floating-point number
|
* **Range of values**: a floating-point number
|
||||||
* **Type**: `float`
|
* **Type**: `float`
|
||||||
* **Default value**: `0`
|
* **Default value**: `0`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ When there is no box selected, `selected_num` is filled with `0`. `selected_outp
|
|||||||
</port>
|
</port>
|
||||||
<port id="6" precision="I64">
|
<port id="6" precision="I64">
|
||||||
<dim>-1</dim>
|
<dim>-1</dim>
|
||||||
<dim>1</dim>
|
<dim>1</dim>
|
||||||
</port>
|
</port>
|
||||||
<port id="7" precision="I64">
|
<port id="7" precision="I64">
|
||||||
<dim>3</dim>
|
<dim>3</dim>
|
||||||
|
@ -33,7 +33,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* *none* - do not guarantee the order.
|
* *none* - do not guarantee the order.
|
||||||
* **Type**: `string`
|
* **Type**: `string`
|
||||||
* **Default value**: `none`
|
* **Default value**: `none`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *sort_result_across_batch*
|
* *sort_result_across_batch*
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* *false* - do not sort selected boxes across batches (boxes are sorted per batch element).
|
* *false* - do not sort selected boxes across batches (boxes are sorted per batch element).
|
||||||
* **Type**: boolean
|
* **Type**: boolean
|
||||||
* **Default value**: false
|
* **Default value**: false
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *output_type*
|
* *output_type*
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* **Range of values**: `i64` or `i32`
|
* **Range of values**: `i64` or `i32`
|
||||||
* **Type**: `string`
|
* **Type**: `string`
|
||||||
* **Default value**: `i64`
|
* **Default value**: `i64`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *iou_threshold*
|
* *iou_threshold*
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* **Range of values**: a floating-point number
|
* **Range of values**: a floating-point number
|
||||||
* **Type**: `float`
|
* **Type**: `float`
|
||||||
* **Default value**: `0`
|
* **Default value**: `0`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *score_threshold*
|
* *score_threshold*
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* **Range of values**: a floating-point number
|
* **Range of values**: a floating-point number
|
||||||
* **Type**: `float`
|
* **Type**: `float`
|
||||||
* **Default value**: `0`
|
* **Default value**: `0`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *nms_top_k*
|
* *nms_top_k*
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* **Range of values**: an integer
|
* **Range of values**: an integer
|
||||||
* **Type**: `int`
|
* **Type**: `int`
|
||||||
* **Default value**: `-1` meaning to keep all boxes
|
* **Default value**: `-1` meaning to keep all boxes
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *keep_top_k*
|
* *keep_top_k*
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* **Range of values**: an integer
|
* **Range of values**: an integer
|
||||||
* **Type**: `int`
|
* **Type**: `int`
|
||||||
* **Default value**: `-1` meaning to keep all boxes
|
* **Default value**: `-1` meaning to keep all boxes
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *background_class*
|
* *background_class*
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* **Range of values**: an integer
|
* **Range of values**: an integer
|
||||||
* **Type**: `int`
|
* **Type**: `int`
|
||||||
* **Default value**: `-1` meaning to keep all classes.
|
* **Default value**: `-1` meaning to keep all classes.
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *normalized*
|
* *normalized*
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* *false* - the box coordinates are not normalized.
|
* *false* - the box coordinates are not normalized.
|
||||||
* **Type**: boolean
|
* **Type**: boolean
|
||||||
* **Default value**: True
|
* **Default value**: True
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
* *nms_eta*
|
* *nms_eta*
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ Boxes of `background_class` are skipped and thus eliminated.
|
|||||||
* **Range of values**: a floating-point number in close range `[0, 1.0]`.
|
* **Range of values**: a floating-point number in close range `[0, 1.0]`.
|
||||||
* **Type**: `float`
|
* **Type**: `float`
|
||||||
* **Default value**: `1.0`
|
* **Default value**: `1.0`
|
||||||
* **Required**: *No*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ When there is no box selected, `selected_num` is filled with `0`. `selected_outp
|
|||||||
</port>
|
</port>
|
||||||
<port id="6" precision="I64">
|
<port id="6" precision="I64">
|
||||||
<dim>-1</dim>
|
<dim>-1</dim>
|
||||||
<dim>1</dim>
|
<dim>1</dim>
|
||||||
</port>
|
</port>
|
||||||
<port id="7" precision="I64">
|
<port id="7" precision="I64">
|
||||||
<dim>3</dim>
|
<dim>3</dim>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user