Function absolute

  • Alias for abs.

    Plot of abs and its gradient

    Calculates:

    output = abs(input)
    

    Gradient:

    inputGrad = input == 0 ? 0 : (input > 0 ? outputGrad : -outputGrad)
    

    Parameters

    • input: Tensor

      the input tensor of any shape

    Returns Tensor

    the output tensor

Generated using TypeDoc