Hyperbolic Tangent (Tanh)#
API#
- class warp_nn.modules.operators.Tanh(*, requires_grad: bool = True)[source]#
Bases:
ModuleHyperbolic Tangent (Tanh) operation.
This class computes the element-wise hyperbolic tangent:
\[\text{Tanh}(x) = \frac{\sinh(x)}{\cosh(x)} = \frac{e^x - e^{-x}}{e^x + e^{-x}}\]- Parameters:
requires_grad – Whether the cached output arrays of the module require gradients.