HardTanh
Applies the HardTanh function element-wise to the input Tensor, thus outputting a Tensor of the same dimension.
HardTanh is defined as:
f(x)
1, if x >
1,
-1, if x <
-1,
x,
otherwise.