oneflow.acosh

oneflow.acosh()

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

\[\text{out}_{i} = \cosh^{-1}(\text{input}_{i})\]
Parameters

input (Tensor) – the input tensor.

For example:

>>> import oneflow as flow
>>> import numpy as np
>>> x1 = flow.tensor(np.array([2, 3, 4]).astype(np.float32))
>>> out1 = flow.acosh(x1)
>>> out1
tensor([1.3170, 1.7627, 2.0634], dtype=oneflow.float32)
>>> x2 = flow.tensor(np.array([1.5, 2.6, 3.7]).astype(np.float32),device=flow.device('cuda'))
>>> out2 = flow.acosh(x2)
>>> out2
tensor([0.9624, 1.6094, 1.9827], device='cuda:0', dtype=oneflow.float32)