What it does
Swish (also called SiLU) multiplies each input by its own sigmoid. Like GELU, it behaves like ReLU far from zero but is smooth around zero and dips a little below it. Many exporters have no dedicated operator, so it appears as a Sigmoid node whose output is multiplied back into its input. Hard swish swaps the sigmoid for a piecewise-linear ramp that is cheaper on phones. Softplus is a smooth version of ReLU, and Mish multiplies x by tanh(softplus(x)). They all share the idea of a gentle curve instead of a hard corner.
Formula
swish(x) = x · σ(x)hardswish(x) = x · min(max(0, x + 3), 6) / 6softplus(x) = log(1 + ex), mish(x) = x · tanh(softplus(x))Shapes and parameters
- Shapes
- Any shape in, the same shape out.
- Parameters
- None. An activation is a fixed function applied to every element, so it adds no parameters.
- Used for
- EfficientNet and MobileNet V3 style networks, NanoDet and other compact detectors, some speech and depth models.
In WeightSpace
Read-only in WeightSpace today: there is nothing learned inside it. When an edit moves a bias in the layer before it, this function decides how much of that shift reaches the next layer, so its shape explains why some edits flip an answer and others barely move it.