oneflow.cosh¶
-
oneflow.
cosh
()¶ Returns a new tensor with the hyperbolic cosine of the elements of
input
.\[\text{out}_{i} = \cosh(\text{input}_{i})\]- Parameters
input (Tensor) – the input tensor.
For example:
>>> import numpy as np >>> import oneflow as flow >>> arr = np.array([ 0.1632, 1.1835, -0.6979, -0.7325]) >>> input = flow.tensor(arr, dtype=flow.float32) >>> output = flow.cosh(input).numpy() >>> output array([1.0133467, 1.7859949, 1.2535787, 1.2804903], dtype=float32)