Function sigmoid

  • Calculate the sigmoid (logistic function) for each element in a Tensor. There is a method version of this static function: Tensor.sigmoid.

    $$\frac{1}{1 + e^{-x}} : \forall x \in T$$

    Example

      const t = sm.randn([1337])

    // equivalent calls
    const a = t.sigmoid()
    const b = sm.sigmoid(t)

    Returns

    Parameters

    • tensor: Tensor

      Tensor whose values will have their sigmoid calculated

    Returns Tensor

Generated using TypeDoc