Chalkboard - v3.1.0
    Preparing search index...

    Function normalize

    • Calculates the normalization of a tensor.

      Parameters

      • tens: ChalkboardTensor

        The tensor

      • Optionaltype: "L1" | "L2" | "LInfinity" | "L0" = "L2"

        The type of norm, which can be "L0", "L1", "L2", or "LInfinity"

      Returns ChalkboardTensor

      const result = Chalkboard.tens.normalize([3, 4]); // Returns [0.6, 0.8]