elu

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

Apply the exponential linear unit to input. [Clevert et.al, 2015].

The ELU function is defined as:

\[\text{ELU}(x) = \begin{cases} x, & \text{ if } x \geq 0 \\ alpha * (e^{x} - 1), & \text{ otherwise } \end{cases} \]

See also

torch.nn.ELU - Apply the exponential linear unit.

Parameters:
  • input (dragon.vm.torch.Tensor) – The input tensor.
  • alpha (float, optional, default=1.) – The value of alpha.
  • inplace (bool, optional, default=False) – Whether to do the operation in-place.
Returns:

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