Function relu

  • Plot of relu and its gradient

    Calculates:

    output = max(input, 0.0)
    

    Gradient:

    inputGrad = input > 0.0 ? outputGrad : 0.0
    

    Parameters

    • input: Tensor

      the input tensor of any shape

    Returns Tensor

    the output tensor

Generated using TypeDoc