Added opset docs (#992)
This commit is contained in:
70
docs/ops/condition/Bucketize_3.md
Normal file
70
docs/ops/condition/Bucketize_3.md
Normal file
@@ -0,0 +1,70 @@
|
||||
## Bucketize <a name="Bucketize"></a>
|
||||
|
||||
**Versioned name**: *Bucketize-3*
|
||||
|
||||
**Category**: Condition operation
|
||||
|
||||
**Short description**: *Bucketize* bucketizes the input based on boundaries. This is similar to [Reference](https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/bucketize).
|
||||
|
||||
**Detailed description**: *Bucketize* computes a bucket index for each element from the first input and outputs a tensor of the first input shape. Buckets are defined with boundaries from the second input.
|
||||
|
||||
For example, if the first input tensor is `[[3, 50], [10, -1]]` and the second input is `[0, 5, 10]` with included right bound, the output will be `[[1, 3], [2, 0]]`.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *output_type*
|
||||
|
||||
* **Description**: the output tensor type
|
||||
* **Range of values**: "i64" or "i32"
|
||||
* **Type**: string
|
||||
* **Default value**: "i64"
|
||||
* **Required**: *No*
|
||||
|
||||
* *with_right_bound*
|
||||
|
||||
* **Description**: indicates whether bucket includes the right or the left edge of interval.
|
||||
* **Range of values**:
|
||||
* True - bucket includes the right interval edge
|
||||
* False - bucket includes the left interval edge
|
||||
* **Type**: `boolean`
|
||||
* **Default value**: True
|
||||
* **Required**: *no*
|
||||
|
||||
**Inputs**:
|
||||
|
||||
* **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.
|
||||
|
||||
**Outputs**:
|
||||
|
||||
* **1**: Output tensor with bucket indices of *T_IND* type. If the second input is empty, the bucket index for all elements is equal to 0. The output tensor shape is the same as the first input tensor shape.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T*: any numeric type.
|
||||
|
||||
* *T_BOUNDARIES*: any numeric type.
|
||||
|
||||
* *T_IND*: `int32` or `int64`.
|
||||
|
||||
**Example**
|
||||
|
||||
```xml
|
||||
<layer ... type="Bucketize">
|
||||
<input>
|
||||
<port id="0">
|
||||
<dim>49</dim>
|
||||
<dim>11</dim>
|
||||
</port>
|
||||
<port id="1">
|
||||
<dim>5</dim>
|
||||
</port>
|
||||
</input>
|
||||
<output>
|
||||
<port id="1">
|
||||
<dim>49</dim>
|
||||
<dim>11</dim>
|
||||
</port>
|
||||
</output>
|
||||
</layer>
|
||||
```
|
||||
56
docs/ops/condition/NonZero_3.md
Normal file
56
docs/ops/condition/NonZero_3.md
Normal file
@@ -0,0 +1,56 @@
|
||||
## NonZero <a name="NonZero"></a>
|
||||
|
||||
**Versioned name**: *NonZero-3*
|
||||
|
||||
**Category**: Condition operation
|
||||
|
||||
**Short description**: *NonZero* returns the indices of the non-zero elements of the input tensor.
|
||||
|
||||
**Detailed description**: *NonZero* returns the indices of the non-zero elements of the input tensor (in row-major order - by dimension).
|
||||
The output tensor has shape `[rank(input), num_non_zero]`. For example, for the tensor `[[1, 0], [1, 1]]` the output will be `[[0, 1, 1], [0, 0, 1]]`.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *output_type*
|
||||
|
||||
* **Description**: the output tensor type
|
||||
* **Range of values**: "i64" or "i32"
|
||||
* **Type**: string
|
||||
* **Default value**: "i64"
|
||||
* **Required**: *No*
|
||||
|
||||
**Inputs**:
|
||||
|
||||
* **1**: `data` tensor of arbitrary rank of type *T*. Required.
|
||||
|
||||
**Outputs**:
|
||||
|
||||
* **1**: tensor with indices of non-zero elements of shape `[rank(data), num_non_zero]` of type *T_IND*.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T*: any numeric type.
|
||||
|
||||
* *T_IND*: `int64` or `int32`.
|
||||
|
||||
**Example**
|
||||
|
||||
```xml
|
||||
<layer ... type="NonZero">
|
||||
<data output_type="i64"/>
|
||||
<input>
|
||||
<port id="0">
|
||||
<dim>3</dim>
|
||||
<dim>10</dim>
|
||||
<dim>100</dim>
|
||||
<dim>200</dim>
|
||||
</port>
|
||||
</input>
|
||||
<output>
|
||||
<port id="1">
|
||||
<dim>4</dim>
|
||||
<dim>600000</dim>
|
||||
</port>
|
||||
</output>
|
||||
</layer>
|
||||
```
|
||||
66
docs/ops/condition/Select_1.md
Normal file
66
docs/ops/condition/Select_1.md
Normal file
@@ -0,0 +1,66 @@
|
||||
## Select <a name="Select"></a>
|
||||
|
||||
**Versioned name**: *Select-1*
|
||||
|
||||
**Category**: *Conditions*
|
||||
|
||||
**Short description**: *Select* returns a tensor filled with the elements from the second or the third inputs, depending on the condition (the first input) value.
|
||||
|
||||
**Detailed description**
|
||||
|
||||
*Select* takes elements from `then` input tensor or the `else` input tensor based on a condition mask
|
||||
provided in the first input `cond`. Before performing selection, input tensors `then` and `else` are broadcasted to each other if their shapes are different and `auto_broadcast` attributes is not `none`. Then the `cond` tensor is one-way broadcasted to the resulting shape of broadcasted `then` and `else`. Broadcasting is performed according to `auto_broadcast` value.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *auto_broadcast*
|
||||
|
||||
* **Description**: specifies rules used for auto-broadcasting of input tensors.
|
||||
* **Range of values**:
|
||||
* *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>.
|
||||
* **Type**: string
|
||||
* **Default value**: "numpy"
|
||||
* **Required**: *no*
|
||||
|
||||
|
||||
**Inputs**:
|
||||
|
||||
* **1**: `cond` tensor with selection mask of type `boolean`. The tensor can be 0D.
|
||||
|
||||
* **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.
|
||||
|
||||
* **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.
|
||||
|
||||
|
||||
**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`.
|
||||
|
||||
|
||||
**Example**
|
||||
|
||||
```xml
|
||||
<layer ... type="Select">
|
||||
<input>
|
||||
<port id="0"> <!-- cond value is: [[false, false], [true, false], [true, true]] -->
|
||||
<dim>3</dim>
|
||||
<dim>2</dim>
|
||||
</port>
|
||||
<port id="1"> <!-- then value is: [[-1, 0], [1, 2], [3, 4]] -->
|
||||
<dim>3</dim>
|
||||
<dim>2</dim>
|
||||
</port>
|
||||
<port id="2"> <!-- else value is: [[11, 10], [9, 8], [7, 6]] -->
|
||||
<dim>3</dim>
|
||||
<dim>2</dim>
|
||||
</port>
|
||||
</input>
|
||||
<output>
|
||||
<port id="1"> <!-- output value is: [[11, 10], [1, 8], [3, 4]] -->
|
||||
<dim>3</dim>
|
||||
<dim>2</dim>
|
||||
</port>
|
||||
</output>
|
||||
</layer>
|
||||
```
|
||||
Reference in New Issue
Block a user