selu

dragon.vm.torch.nn.functional.selu(
  input,
  inplace=False
)[source]

Apply the scaled exponential linear unit to input. [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 * (e^{x} - 1), & \text{ otherwise } \end{cases} \]
Parameters:
  • input (dragon.vm.torch.Tensor) – The input tensor.
  • inplace (bool, optional, default=False) – Whether to do the operation in-place.
Returns:

dragon.vm.torch.Tensor – The output tensor.