PyTorch torch.arccosh function
PyTorch torch reference manual
torch.arccosh is a function in PyTorch used to compute the element-wise inverse hyperbolic cosine, the same as torch.acosh in functionality.
Function definition
torch.arccosh(input, out=None)
Usage examples
Example
import
torch
Create a tensor with values greater than or equal to 1
x
=
torch.
tensor
(
[
1.0
,
1.5
,
2.0
,
3.0
]
)
Compute the inverse hyperbolic cosine
result
=
torch.
arccosh
(
x
)
(
result
)
The output is:
tensor([0.0000, 0.9624, 1.3170, 1.7627])