Function reciprocal

  • Plot of reciprocal and its gradient

    Calculates:

    output = 1.0 / input
    

    Gradient:

    inputGrad = -outputGrad / (input * input)
    

    Parameters

    • input: Tensor

      the input tensor of any shape

    Returns Tensor

    the output tensor

Generated using TypeDoc