Description
Measure absolute distances from x to breakpoints -3 and +3.
HardSwish combines a linear input with a clipped linear gate. In the symmetric-scale convention, the gate changes between -scale and +scale and the middle branch is quadratic. Its negative minimum and breakpoint distances describe different properties.
Measure absolute distances from x to breakpoints -3 and +3.
When to use this tool
Use HardSwish Breakpoint Distance when checking the stated HardSwish quadratic minimum or breakpoint convention.
How to use the tool and how it works
- Enter x. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read distance, nearestBreakpoint, tie. Inspect tie before interpreting the associated values.
Measure absolute distances from x to breakpoints -3 and +3. Return the smaller distance, choose -3 on an exact tie and report tie separately.1
HardSwish uses a clipped linear gate. The familiar breakpoints are ±3; this helper’s explicit fixed or parameterized convention must be checked when comparing implementations.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| x | Finite scalar input coordinate; use the mathematical scale specified above. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| distance | Distance | Required. Finite number. |
| nearestBreakpoint | Nearest Breakpoint | Required. Finite number. |
| tie | Tie | Required. Boolean. |
{
"input": {
"x": 2
},
"output": {
"distance": 1,
"nearestBreakpoint": 3,
"tie": false
}
} Limitations and assumptions
- This uses fixed breakpoints ±3; it does not infer a library's scale or evaluate the activation/derivative.
- 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
-
Calculation and input contract: activation/hardswish-breakpoint-distance — tool.io
-
Searching for MobileNetV3 — Andrew Howard and coauthors
Similar or alternative tools
- HardSwish Negative Minimum
Return input=-scale/2 and value=-scale/8 for its quadratic-branch minimum.
- HardTanh Saturation Distance Tool
Measure input displacement from the closed linear interval of a hard-tanh activation.