Tanh shrink activation function.
Applies the element-wise function:
\[\text{Tanhshrink}(x) = x - \tanh(x)\]
- Parameters:
x (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – Input array.
- Returns:
Output array with the same shape as the input.
- Return type:
Array | Quantity