SELU¶
- class
dragon.vm.torch.nn.
SELU
(inplace=False)[source]¶ Apply the scaled exponential linear unit. [Klambauer et.al, 2017].
The SELU function is defined as:
\[\text{SELU}(x) = 1.0507 * \begin{cases} x, & \text{ if } x \geq 0 \\ 1.67326 * (\exp(x) - 1), & \text{ otherwise } \end{cases} \]Examples:
m = torch.nn.SELU() x = torch.randn(2, 3) y = m(x)
See also