Applies the HardTanh function element-wise HardTanh is defined as:
Examples
if (torch_is_installed()) {
m <- nn_hardtanh(-2, 2)
input <- torch_randn(2)
output <- m(input)
}
Applies the HardTanh function element-wise HardTanh is defined as:
if (torch_is_installed()) {
m <- nn_hardtanh(-2, 2)
input <- torch_randn(2)
output <- m(input)
}