Function neg

  • Plot of neg and its gradient

    Calculates:

    output = -input
    

    Gradient:

    inputGrad = -outputGrad
    

    Parameters

    • input: Tensor

      the input tensor of any shape

    Returns Tensor

    the output tensor

Generated using TypeDoc