PyTorch torch.arccosh Function
Pytorch torch Reference Manual
torch.arccoshis a function in PyTorch for computing element-wise inverse hyperbolic cosine, withtorch.acoshthe same functionality.
Function Definition
torch.arccosh(input, out=None)
Usage Example
Example
import torch
# Create a tensor 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)
print(result)
# Create a tensor 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)
print(result)
The output result is:
tensor([0.0000, 0.9624, 1.3170, 1.7627])
Other Extensions