Swish

Activation · node type · HardSwish, Mish, Softplus, Mul, Sigmoid

x times sigmoid(x): a smooth, slightly non-monotonic alternative to ReLU used in efficient CNNs.

Also called SiLU, Hard swish, Mish, Softplus

Move the input and compare activation functions. The gradient is what training sees: where it is flat, learning stalls.
-4-224-22

f(1.00) = 0.731

Figure 1. Try it: every number is computed in your browser from the formula below.

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.

Figure 2. Swish inside Track a subject between frames, a real model in WeightSpace. The 6 outlined nodes are Swish; select any node for its shapes and parameters.

Figure 3. The typed ports of Swish, in the same format as every model drawing. Letters such as N or C stand for any size.

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.