Function sigmoid

  • Plot of sigmoid and its gradient

    Calculates:

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

    Gradient:

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

    Parameters

    • input: Tensor

      the input tensor of any shape

    Returns Tensor

    the output tensor

Generated using TypeDoc