Skip to content

Main content

Hardshrink Zero Preimage Interval Tool

Return the closed interval mapped to zero by the strict-outside-threshold hard-shrink convention.

Loading tool…

Description

Return lower=-threshold and upper=threshold, both included, as the zero-output preimage of hardshrink.

Hardshrink removes values inside a symmetric threshold interval and leaves survivors unchanged. Softshrink also subtracts the threshold from surviving magnitudes. Equality policies determine which boundary values are removed; a threshold decision alone does not imply statistical significance.

Return lower=-threshold and upper=threshold, both included, as the zero-output preimage of hardshrink.

When to use this tool

Use Hardshrink Zero Preimage Interval when checking the stated hard/soft-shrink threshold or inverse-region convention.

How to use the tool and how it works

  1. Enter threshold. 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 lower, upper, includeLower, includeUpper. Inspect includeLower, includeUpper before interpreting the associated values.

Require threshold>=0. Return lower=-threshold and upper=threshold, both included, as the zero-output preimage of hardshrink.1

Input fieldMeaning and unitsAccepted input
thresholdSupplied symmetric or one-sided activation threshold as defined above.Required. Finite number; minimum 0.
Output fieldInterpretationReturned shape
lowerLowerRequired. Finite number.
upperUpperRequired. Finite number.
includeLowerInclude LowerRequired. Boolean.
includeUpperInclude UpperRequired. Boolean.
json
{
  "input": {
    "threshold": 0.5
  },
  "output": {
    "lower": -0.5,
    "upper": 0.5,
    "includeLower": true,
    "includeUpper": true
  }
}

Limitations and assumptions

  • Outside this interval hardshrink returns its input; this differs from softshrink, which also reduces the magnitude of retained values.
  • 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/hardshrink-zero-preimage-interval — tool.io

Similar or alternative tools