Skip to contents

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

Usage

nv_logistic(operand)

Arguments

operand

(tensorish)
Operand.

Value

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

See also

nvl_logistic() for the underlying primitive.

Examples

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