PyTorch · Class
nn.Tanh
torch.nn.Tanh applies the hyperbolic tangent to each tensor element. It returns a tensor with the same shape as the input.
Last updated
Syntax
torch.nn.Tanh(*args, **kwargs)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
torch.nn.modules.activation.Tanhforward