Table of Contents
Shortcuts

# torch.atanh

torch.atanh(input, *, out=None) → Tensor

  Returns a new tensor with the inverse hyperbolic tangent of the elements of `input`.

  Note

  The domain of the inverse hyperbolic tangent is (-1, 1) and values outside this range will be mapped to `NaN`, except for the values 1 and -1 for which the output is mapped to +/-INF respectively.

  out i=tanh⁡−1(input i)\text{out}_{i} = \tanh^{-1}(\text{input}_{i}) out i​=tanh−1(input i​)
  Parameters:

    input (Tensor) – the input tensor.

  Keyword Arguments:

    out (Tensor, optional) – the output tensor.

  Example:

      >>> a = torch.randn(4).uniform_(-1, 1)
      >>> a
      tensor([ -0.9385, 0.2968, -0.8591, -0.1871 ])
      >>> torch.atanh(a)
      tensor([ -1.7253, 0.3060, -1.2899, -0.1893 ])

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.