Description
retained means abs(x)>threshold; output=sign(x)*max(0,abs(x)-threshold).
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.
retained means abs(x)>threshold; output=sign(x)*max(0,abs(x)-threshold).
When to use this tool
Use Activation: Softshrink Threshold Decision when checking the stated hard/soft-shrink threshold or inverse-region convention.
How to use the tool and how it works
- Enter x, threshold. 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 threshold in [0,10^12]. retained means abs(x)>threshold; output=sign(x)*max(0,abs(x)-threshold).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| x | Finite scalar input coordinate; use the mathematical scale specified above. | Required. Finite number. |
| threshold | Supplied symmetric or one-sided activation threshold as defined above. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the operation-specific returned members listed below. | Required. Object. |
| result.retained | Retained | Calculated result member: boolean. |
| result.output | Output | Calculated result member: number. |
{
"input": {
"x": -3,
"threshold": 2
},
"output": {
"result": {
"retained": true,
"output": -1
}
}
} Limitations and assumptions
- Equality is removed and surviving values shrink toward zero; retained is a branch flag, not evidence of statistical significance.
- 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
- Activation: Hardshrink Threshold Decision
retained means abs(x)>threshold; return x for retained values and zero otherwise.
- Hardshrink Zero Preimage Interval
Return lower=-threshold and upper=threshold, both included, as the zero-output preimage of hardshrink.