Skip to contents

Element-wise hyperbolic tangent. You can also use tanh().

Usage

nv_tanh(operand)

Arguments

operand

(arrayish)
Operand.

Value

arrayish
Has the same shape and data type as the input.

See also

prim_tanh() for the underlying primitive.

Examples

x <- nv_array(c(-1, 0, 1))
tanh(x)
#> AnvlArray
#>  -0.7616
#>   0.0000
#>   0.7616
#> [ CPUf32{3} ]