Skip to content

Main content

HardSwish Negative Minimum Tool

Find the minimum of x*clamp(x+scale,0,2*scale)/(2*scale) on its quadratic branch.

Loading tool…

Description

Return input=-scale/2 and value=-scale/8 for its quadratic-branch minimum.

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.

Return input=-scale/2 and value=-scale/8 for its quadratic-branch minimum.

When to use this tool

Use HardSwish Negative Minimum when checking the stated HardSwish quadratic minimum or breakpoint convention.

How to use the tool and how it works

  1. Enter scale. 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 input, value. Use the output convention below.

Require scale>0 for x*clamp(x+scale,0,2*scale)/(2*scale). Return input=-scale/2 and value=-scale/8 for its quadratic-branch minimum.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
scalePositive symmetric breakpoint magnitude in x*clamp(x+scale,0,2*scale)/(2*scale).Required. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
inputInputRequired. Finite number.
valueValueRequired. Finite number.
json
{
  "input": {
    "scale": 3
  },
  "output": {
    "input": -1.5,
    "value": -0.375
  }
}

Limitations and assumptions

  • Scale is the symmetric breakpoint magnitude, not a generic output multiplier; this is not the derivative at the two joins.
  • 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-negative-minimum — tool.io

  2. Searching for MobileNetV3 — Andrew Howard and coauthors

Similar or alternative tools