torch.atanh#
- torch.atanh(input: Tensor, *, out: Optional[Tensor]) Tensor #
返回一个新张量,其中包含
input
元素的双曲反正切。注意
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.示例
>>> 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 ])