Add specification for Round operation (#2238)
authorAnton Chetverikov <Anton.Chetverikov@intel.com>
Wed, 7 Oct 2020 15:33:43 +0000 (18:33 +0300)
committerGitHub <noreply@github.com>
Wed, 7 Oct 2020 15:33:43 +0000 (18:33 +0300)
* Add specification for Round operation

* Create opset5.md file

* Resolve review comments

* Remove useless formula section from specification

* Update specification

* Update Round specification

* Resolve review comments

docs/doxygen/ie_docs.xml
docs/ops/arithmetic/Round_5.md [new file with mode: 0644]
docs/ops/opset5.md

index fbc4b1a..172ba31 100644 (file)
                         <tab type="user" title="RNNSequence-5" url="@ref openvino_docs_ops_sequence_RNNSequence_5"/>
                         <tab type="user" title="ROIAlign-3" url="@ref openvino_docs_ops_detection_ROIAlign_3"/>
                         <tab type="user" title="ROIPooling-1" url="@ref openvino_docs_ops_detection_ROIPooling_1"/>
+                        <tab type="user" title="Round-5" url="@ref openvino_docs_ops_arithmetic_Round_5"/>
                         <tab type="user" title="ScatterElementsUpdate-3" url="@ref openvino_docs_ops_movement_ScatterElementsUpdate_3"/>
                         <tab type="user" title="ScatterNDUpdate" url="@ref openvino_docs_ops_movement_ScatterNDUpdate_3"/>
                         <tab type="user" title="ScatterUpdate-3" url="@ref openvino_docs_ops_movement_ScatterUpdate_3"/>
diff --git a/docs/ops/arithmetic/Round_5.md b/docs/ops/arithmetic/Round_5.md
new file mode 100644 (file)
index 0000000..6d5eaf3
--- /dev/null
@@ -0,0 +1,57 @@
+## Round <a name="Round"></a> {#openvino_docs_ops_arithmetic_Round_5}
+
+**Versioned name**: *Round-5*
+
+**Category**: Arithmetic unary operation 
+
+**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 halfs, 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]
+    
+    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]
+
+**Attributes**:
+
+* *mode*
+
+  * **Description**:  If set to `half_to_even` then the rule is to round halfs to the nearest even integer, if set to `half_away_from_zero` then rounding in such a way that the result heads away from zero.
+  * **Range of values**: `half_to_even` or `half_away_from_zero`
+  * **Type**: string
+  * **Default value**: `half_to_even`
+  * **Required**: *no*
+
+**Inputs**
+
+* **1**: A tensor of type *T*. **Required.**
+
+**Outputs**
+
+* **1**: The result of element-wise round operation. A tensor of type *T*.
+
+**Types**
+
+* *T*: any numeric type.
+
+**Example**
+
+```xml
+<layer ... type="Round">
+    <data mode="half_to_even"/>
+    <input>
+        <port id="0">
+            <dim>256</dim>
+            <dim>56</dim>
+        </port>
+    </input>
+    <output>
+        <port id="1">
+            <dim>256</dim>
+            <dim>56</dim>
+        </port>
+    </output>
+</layer>
+```
index 55d1550..9d1b0a8 100644 (file)
@@ -122,6 +122,7 @@ declared in `namespace opset5`.
 * [RNNSequence](sequence/RNNSequence_5.md)
 * [ROIAlign](detection/ROIAlign_3.md)
 * [ROIPooling](detection/ROIPooling_1.md)
+* [Round](arithmetic/Round_5.md)
 * [ScatterElementsUpdate](movement/ScatterElementsUpdate_3.md)
 * [ScatterNDUpdate](movement/ScatterNDUpdate_3.md)
 * [ScatterUpdate](movement/ScatterUpdate_3.md)