fn

sinh

Tensor
sinh(input: Tensor)
source

Element-wise hyperbolic sine.

Computes sinh(x)=(exex)/2\sinh(x) = (e^{x} - e^{-x}) / 2 for each entry.

Parameters

inputTensor
Input tensor.

Returns

Tensor

Element-wise result with the same shape as input.

Notes

Mathematical definition:

outi=sinh(xi)=exiexi2\text{out}_i = \sinh(x_i) = \frac{e^{x_i} - e^{-x_i}}{2}

Gradient: cosh(x)\cosh(x). May overflow for large |x|.

Examples

>>> import lucid
>>> x = lucid.tensor([1.0, 2.0, 3.0])
>>> lucid.sinh(x)
Tensor([...])