Function silu

  • Plot of silu and its gradient

    Calculates:

    output = input / (1.0 + exp(-input))
    

    Gradient:

    var out = 1.0 / (1.0 + exp(-input)); inputGrad = outputGrad * (out + input * out * (1.0 - out))
    

    Parameters

    • input: Tensor

      the input tensor of any shape

    Returns Tensor

    the output tensor

Generated using TypeDoc