Applies the rectified linear unit function element-wise
Examples
if (torch_is_installed()) {
m <- nn_relu()
input <- torch_randn(2)
m(input)
}
#> torch_tensor
#> 0.1149
#> 1.0764
#> [ CPUFloatType{2} ]
Applies the rectified linear unit function element-wise
if (torch_is_installed()) {
m <- nn_relu()
input <- torch_randn(2)
m(input)
}
#> torch_tensor
#> 0.1149
#> 1.0764
#> [ CPUFloatType{2} ]