Skip to content

Main content

HardSwish Breakpoint Distance Tool

Measure distance to the fixed -3 and +3 hard-swish breakpoints, retaining an exact tie flag.

Loading tool…

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

  1. Enter x. 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 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 fieldMeaning and unitsAccepted input
xFinite scalar input coordinate; use the mathematical scale specified above.Required. Finite number.
Output fieldInterpretationReturned shape
distanceDistanceRequired. Finite number.
nearestBreakpointNearest BreakpointRequired. Finite number.
tieTieRequired. Boolean.
json
{
  "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

  1. Calculation and input contract: activation/hardswish-breakpoint-distance — tool.io

  2. Searching for MobileNetV3 — Andrew Howard and coauthors

Similar or alternative tools