Rate this Page

torch.atanh#

torch.atanh(input:Tensor,*,out:Optional[Tensor])Tensor#

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

Note

The domain of the inverse hyperbolic tangent is(-1, 1) and values outside this rangewill be mapped toNaN, except for the values1 and-1 for which the output ismapped to+/-INF respectively.

outi=tanh1(inputi)\text{out}_{i} = \tanh^{-1}(\text{input}_{i})
Parameters

input (Tensor) – the input tensor.

Keyword Arguments

out (Tensor,optional) – the output tensor.

Example:

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