Skip to content

Main content

ReLU Zero Subgradient Choice Tool

Return a ReLU slope away from zero and a caller-selected convex subgradient at zero.

Loading tool…

Description

Return slope one for positive x, zero for negative x and the supplied slope at zero; flag x=0 as nondifferentiable.

ReLU clips negative input to zero; ReLU6 also clips above six. Saturated outputs have entire input rays as preimages, unlike interior values with single inverses. At a ReLU kink a selected subgradient is not an ordinary two-sided derivative.

Return slope one for positive x, zero for negative x and the supplied slope at zero; flag x=0 as nondifferentiable.

When to use this tool

Use ReLU Zero Subgradient Choice when checking the stated rectifier value, inverse region or subgradient convention.

How to use the tool and how it works

  1. Enter x, suppliedZeroSlope. 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 slope, atNondifferentiablePoint. Inspect atNondifferentiablePoint before interpreting the associated values.

Require suppliedZeroSlope in [0,1]. Return slope one for positive x, zero for negative x and the supplied slope at zero; flag x=0 as nondifferentiable.1

Input fieldMeaning and unitsAccepted input
xFinite scalar input coordinate; use the mathematical scale specified above.Required. Finite number.
suppliedZeroSlopeChosen subgradient in [0,1] at the ReLU kink, not an ordinary derivative there.Required. Finite number; minimum 0; maximum 1.
Output fieldInterpretationReturned shape
slopeSlopeRequired. Finite number.
atNondifferentiablePointAt Nondifferentiable PointRequired. Boolean.
json
{
  "input": {
    "x": 0,
    "suppliedZeroSlope": 0.25
  },
  "output": {
    "slope": 0.25,
    "atNondifferentiablePoint": true
  }
}

Limitations and assumptions

  • A chosen ReLU subgradient at zero is not an ordinary two-sided derivative there or a complete autodifferentiation policy.
  • 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/relu-zero-subgradient-choice — tool.io

Similar or alternative tools