leaky_relu¶
dragon.vm.torch.nn.functional.
leaky_relu
(
input,
negative_slope=0.01,
inplace=False
)[source]¶Apply the leaky rectified linear unit to input.
The LeakyReLU function is defined as:
\[\text{LeakyReLU}(x) = \begin{cases} x, & \text{ if } x \geq 0 \\ slope * x, & \text{ otherwise } \end{cases} \]- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- negative_slope (float, optional, default=0.01) – The slope to the negative side.
- inplace (bool, optional, default=False) – Whether to do the operation in-place.
- Returns:
dragon.vm.torch.Tensor – The output tensor.
See also