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
- Enter threshold. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| threshold | Supplied symmetric or one-sided activation threshold as defined above. | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| lower | Lower | Required. Finite number. |
| upper | Upper | Required. Finite number. |
| includeLower | Include Lower | Required. Boolean. |
| includeUpper | Include Upper | Required. Boolean. |
{
"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
Similar or alternative tools
- Activation: Hardshrink Threshold Decision
retained means abs(x)>threshold; return x for retained values and zero otherwise.
- Activation: Softshrink Threshold Decision
retained means abs(x)>threshold; output=sign(x)*max(0,abs(x)-threshold).