Revise specification for Select operation (#6488)
* Add types section and refactored input tesnsor description. * Stylistic changes. * Marked inputs as 'Required'.
This commit is contained in:
parent
fbd0d8beba
commit
dba1fb9adc
@ -17,26 +17,31 @@
|
|||||||
|
|
||||||
* **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 must 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)
|
||||||
* **Type**: string
|
* *pdpd* - PaddlePaddle-style implicit broadcasting, description is available in [Broadcast Rules For Elementwise Operations](../broadcast_rules.md)
|
||||||
|
* **Type**: `string`
|
||||||
* **Default value**: "numpy"
|
* **Default value**: "numpy"
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
|
|
||||||
**Inputs**:
|
**Inputs**:
|
||||||
|
|
||||||
* **1**: `cond` tensor with selection mask of type `boolean`. The tensor can be 0D.
|
* **1**: `cond` - tensor of type *T_COND* and arbitrary shape with selection mask. **Required**.
|
||||||
|
|
||||||
* **2**: `then` the tensor with elements to take where the corresponding element in `cond` is true. Arbitrary type that should match type of `else` input tensor.
|
* **2**: `then` - tensor of type *T* and arbitrary shape with elements to take where the corresponding element in `cond` is `true`. **Required**.
|
||||||
|
|
||||||
* **3**: `else` the tensor with elements to take where the corresponding element in `cond` is false. Arbitrary type that should match type of `then` input tensor.
|
* **3**: `else` - tensor of type *T* and arbitrary shape with elements to take where the corresponding element in `cond` is `false`. **Required**.
|
||||||
|
|
||||||
|
|
||||||
**Outputs**:
|
**Outputs**:
|
||||||
|
|
||||||
* **1**: blended output tensor that is tailored from values of inputs tensors `then` and `else` based on `cond` and broadcasting rules. It has the same type of elements as `then` and `else`.
|
* **1**: blended output tensor that is tailored from values of inputs tensors `then` and `else` based on `cond` and broadcasting rules. It has the same type of elements as `then` and `else`.
|
||||||
|
|
||||||
|
**Types**
|
||||||
|
|
||||||
|
* *T_COND*: `boolean` type.
|
||||||
|
* *T*: any supported numeric type.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user