Elu specification refactoring (#5012)
* Review spec of Elu operation * Change reference link to abstract * Address review comments related to wording
This commit is contained in:
parent
4dad5bc0b8
commit
6f9544007f
@ -8,29 +8,58 @@
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
For each element from the input tensor calculates corresponding
|
||||
element in the output tensor with the following formula:
|
||||
*Elu* operation is introduced in this [article](https://arxiv.org/abs/1511.07289v3).
|
||||
It performs element-wise activation function on a given input tensor, based on the following mathematical formula:
|
||||
|
||||
\f[
|
||||
elu(x) = \left\{\begin{array}{ll}
|
||||
alpha(e^{x} - 1) \quad \mbox{if } x < 0 \\
|
||||
x \quad \mbox{if } x \geq 0
|
||||
Elu(x) = \left\{\begin{array}{r}
|
||||
x \qquad \mbox{if } x > 0 \\
|
||||
\alpha(e^{x} - 1) \quad \mbox{if } x \leq 0
|
||||
\end{array}\right.
|
||||
\f]
|
||||
|
||||
where α corresponds to *alpha* attribute.
|
||||
|
||||
*Elu* is equivalent to *ReLU* operation when *alpha* is equal to zero.
|
||||
|
||||
**Attributes**
|
||||
|
||||
* *alpha*
|
||||
|
||||
* **Description**: scale for the negative factor
|
||||
* **Range of values**: arbitrary floating point number
|
||||
* **Type**: float
|
||||
* **Range of values**: non-negative arbitrary floating-point number
|
||||
* **Type**: `float`
|
||||
* **Default value**: none
|
||||
* **Required**: *yes*
|
||||
|
||||
**Inputs**:
|
||||
|
||||
* **1**: Input tensor x of any floating point type. Required.
|
||||
* **1**: A tensor of type `T` and arbitrary shape. **Required**.
|
||||
|
||||
**Outputs**:
|
||||
|
||||
* **1**: Result of Elu function applied to the input tensor *x*. Floating point tensor with shape and type matching the input tensor.
|
||||
* **1**: The result of element-wise *Elu* function applied to the input tensor. A tensor of type `T` and the same shape as input tensor.
|
||||
|
||||
**Types**
|
||||
|
||||
* *T*: arbitrary supported floating-point type.
|
||||
|
||||
**Example**
|
||||
|
||||
```xml
|
||||
<layer ... type="Elu">
|
||||
<data alpha="1.0"/>
|
||||
<input>
|
||||
<port id="0">
|
||||
<dim>1</dim>
|
||||
<dim>128</dim>
|
||||
</port>
|
||||
</input>
|
||||
<output>
|
||||
<port id="1">
|
||||
<dim>1</dim>
|
||||
<dim>128</dim>
|
||||
</port>
|
||||
</output>
|
||||
</layer>
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user