nn_leaky_relu {torch} | R Documentation |
LeakyReLU module
Description
Applies the element-wise function:
Usage
nn_leaky_relu(negative_slope = 0.01, inplace = FALSE)
Arguments
negative_slope |
Controls the angle of the negative slope. Default: 1e-2 |
inplace |
can optionally do the operation in-place. Default: |
Details
or
Shape
Input:
where
*
means, any number of additional dimensionsOutput:
, same shape as the input
Examples
if (torch_is_installed()) {
m <- nn_leaky_relu(0.1)
input <- torch_randn(2)
output <- m(input)
}
[Package torch version 0.13.0 Index]