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
- Enter y, negativeSlope. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| y | Y | Required. Finite number. |
| negativeSlope | Negative Slope | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the operation-specific returned members listed below. | Required. Object. |
| result.preimages | Finite inverse candidates; may be empty, singleton or two-valued depending on slope and output. | Calculated result member: array. |
| result.unique | Unique | Calculated result member: boolean. |
{
"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
Similar or alternative tools
- Leaky ReLU Negative Inverse Slope Sensitivity
Return -output/slope², the slope sensitivity of negative-branch inverse output/slope.
- Leaky ReLU Slope Partial Derivative
For leaky ReLU, return x when x<0 and zero otherwise as the partial derivative with respect to the negative-branch slope.