Skip to contents

Element-wise logistic sigmoid: 1 / (1 + exp(-x)).

Usage

nv_logistic(operand)

Arguments

operand

(arrayish)
Operand.

Value

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

See also

prim_logistic() for the underlying primitive.

Examples

x <- nv_array(c(-2, 0, 2))
nv_logistic(x)
#> AnvlArray
#>  0.1192
#>  0.5000
#>  0.8808
#> [ CPUf32{3} ]