Function norm

  • Calculates:

    output = output + input * input
    

    with an initial value of output = 0.0.

    Gradient:

    inputGrad = outputGrad * input / output
    

    Parameters

    • input: Tensor

      the input tensor of any shape

    • Optional dim: number | number[]
    • Optional keepdim: boolean

    Returns Tensor

    the output tensor

Generated using TypeDoc