Function logicalNot

  • Take the logical not of every element in a tensor. There is a method version of this static function: Tensor.logicalNot.

    $$\neg x : \forall x \in T$$

    Example

      const t = sm.rand([100]).greaterThan(sm.scalar(0.5))

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

    Returns

    Parameters

    • tensor: Tensor

      Tensor whose values will be logically inverted

    Returns Tensor

Generated using TypeDoc