Skip to content
fn

sinh

→Tensor
sinh(input: Tensor)

Implementing kernel

C++ engine symbols that back this Python API.

Element-wise hyperbolic sine.

Computes sinh⁡(x)=(ex−e−x)/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)=exi−e−xi2\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([...])