Skip to content

Main content

Activation: Leaky ReLU Scalar Inverse Tool

Invert a scalar leaky ReLU with explicitly nonzero negative-branch slope, retaining the two/no-preimage cases for a negative slope rather than claiming a global inverse.

Loading tool…

Description

For positive slope return one inverse, y when y>=0 otherwise y/slope.

Leaky ReLU uses x on its nonnegative branch and slope*x on its negative branch. A positive nonzero slope gives a single inverse, while a negative slope maps both branches to nonnegative outputs and can give two preimages. Input and slope derivatives differ.

For positive slope return one inverse, y when y>=0 otherwise y/slope.

When to use this tool

Use Activation: Leaky ReLU Scalar Inverse when checking the stated leaky-rectifier inverse or slope sensitivity convention.

How to use the tool and how it works

  1. Enter y, negativeSlope. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Require nonzero negativeSlope. For positive slope return one inverse, y when y>=0 otherwise y/slope. For negative slope, negative y has no preimages, zero has [0], and positive y has [y/slope,y]; return the corresponding unique flag.1

Input fieldMeaning and unitsAccepted input
yYRequired. Finite number.
negativeSlopeNegative SlopeRequired. Finite number.
Output fieldInterpretationReturned shape
resultObject containing the operation-specific returned members listed below.Required. Object.
result.preimagesFinite inverse candidates; may be empty, singleton or two-valued depending on slope and output.Calculated result member: array.
result.uniqueUniqueCalculated result member: boolean.
json
{
  "input": {
    "y": 2,
    "negativeSlope": -0.5
  },
  "output": {
    "result": {
      "preimages": [
        -4,
        2
      ],
      "unique": false
    }
  }
}

Limitations and assumptions

  • Negative slope makes the activation non-injective; inverse results are finite preimage lists, not an always-defined single inverse.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use the complete explicit function and the intended parameter, branch and numerical conventions for symbolic, tensor or model-level differentiation; assess training behavior independently.

References

  1. Calculation and input contract: activation/leaky-relu-scalar-inverse — tool.io

Similar or alternative tools