2020-07-20 17:36:08 +03:00
|
|
|
## GRN <a name="GRN"></a> {#openvino_docs_ops_normalization_GRN_1}
|
2020-06-19 14:39:57 +03:00
|
|
|
|
|
|
|
|
**Versioned name**: *GRN-1*
|
|
|
|
|
|
|
|
|
|
**Category**: *Normalization*
|
|
|
|
|
|
|
|
|
|
**Short description**: *GRN* is the Global Response Normalization with L2 norm (across channels only).
|
|
|
|
|
|
|
|
|
|
**Detailed description**:
|
|
|
|
|
|
2021-07-16 14:15:55 +02:00
|
|
|
*GRN* computes the L2 norm across channels for input tensor with shape `[N, C, ...]`. *GRN* does the following with the input tensor:
|
2020-06-19 14:39:57 +03:00
|
|
|
|
|
|
|
|
output[i0, i1, ..., iN] = x[i0, i1, ..., iN] / sqrt(sum[j = 0..C-1](x[i0, j, ..., iN]**2) + bias)
|
|
|
|
|
|
|
|
|
|
**Attributes**:
|
|
|
|
|
|
|
|
|
|
* *bias*
|
|
|
|
|
|
2021-07-16 14:15:55 +02:00
|
|
|
* **Description**: *bias* is added to the sum of squares.
|
|
|
|
|
* **Range of values**: a positive floating-point number
|
2020-06-19 14:39:57 +03:00
|
|
|
* **Type**: `float`
|
|
|
|
|
* **Required**: *yes*
|
|
|
|
|
|
|
|
|
|
**Inputs**
|
|
|
|
|
|
2021-07-16 14:15:55 +02:00
|
|
|
* **1**: `data` - A tensor of type *T* and `2 <= rank <= 4`. **Required.**
|
2020-06-19 14:39:57 +03:00
|
|
|
|
|
|
|
|
**Outputs**
|
|
|
|
|
|
2021-07-16 14:15:55 +02:00
|
|
|
* **1**: The result of *GRN* function applied to `data` input tensor. Normalized tensor of the same type and shape as the data input.
|
|
|
|
|
|
|
|
|
|
**Types**
|
|
|
|
|
|
|
|
|
|
* *T*: arbitrary supported floating-point type.
|
2020-06-19 14:39:57 +03:00
|
|
|
|
|
|
|
|
**Example**
|
|
|
|
|
|
|
|
|
|
```xml
|
2021-07-16 14:15:55 +02:00
|
|
|
<layer ... type="GRN">
|
2020-06-19 14:39:57 +03:00
|
|
|
<data bias="1e-4"/>
|
|
|
|
|
<input>
|
|
|
|
|
<port id="0">
|
|
|
|
|
<dim>1</dim>
|
|
|
|
|
<dim>20</dim>
|
|
|
|
|
<dim>224</dim>
|
|
|
|
|
<dim>224</dim>
|
|
|
|
|
</port>
|
|
|
|
|
</input>
|
|
|
|
|
<output>
|
|
|
|
|
<port id="0" precision="f32">
|
|
|
|
|
<dim>1</dim>
|
|
|
|
|
<dim>20</dim>
|
|
|
|
|
<dim>224</dim>
|
|
|
|
|
<dim>224</dim>
|
|
|
|
|
</port>
|
|
|
|
|
</output>
|
|
|
|
|
</layer>
|
2021-07-14 14:00:29 +02:00
|
|
|
```
|