
Last chance! 50% off unlimited learning
Sale ends in
Applies the hard shrinkage function element-wise:
nn_hardshrink(lambd = 0.5)
the
Input: *
means, any number of additional
dimensions
Output:
if (torch_is_installed()) {
m <- nn_hardshrink()
input <- torch_randn(2)
output <- m(input)
}
Run the code above in your browser using DataLab