Function square

  • Plot of square and its gradient

    Calculates:

    output = input * input
    

    Gradient:

    inputGrad = outputGrad * 2.0 * input
    

    Parameters

    • input: Tensor

      the input tensor of any shape

    Returns Tensor

    the output tensor

Generated using TypeDoc