pytorch / 2 / generated / torch.nn.functional.tanhshrink.html

torch.nn.functional.tanhshrink

torch.nn.functional.tanhshrink(input) → Tensor [source]

Applies element-wise, Tanhshrink ( x ) = x Tanh ( x ) \text{Tanhshrink}(x) = x - \text{Tanh}(x)

See Tanhshrink for more details.

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.nn.functional.tanhshrink.html