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

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