What it does
A classic bottleneck block narrows the channels in the middle. The inverted residual block does the opposite: a 1 × 1 convolution expands a narrow input (say 24 channels) by a factor of about six, a cheap depthwise 3 × 3 convolution filters each wide channel spatially, and a second 1 × 1 convolution projects back to the narrow width with no activation after it, so information in the thin representation is not clipped. When input and output shapes match, the input is added back. The design keeps memory traffic low, which matters on phones and in the browser.
Formula
e = ReLU6(BN(Wexpand x))d = ReLU6(BN(DWConv3×3(e)))y = x + BN(Wproject d)Shapes and parameters
- Shapes
- Input [N, 24, H, W], expanded [N, 144, H, W], output [N, 24, H, W] (or a new width and half the size when the block downsamples).
- Parameters
- C·tC for the expansion, tC·9 for the depthwise filter, tC·C for the projection, plus normalization. For C = 24, t = 6: 3,456 + 1,296 + 3,456 + 624 = 8,832.
- Used for
- MobileNet V2 and V3, MobileFaceNet, EfficientNet, and many compact detectors and pose models.
In WeightSpace
Read-only in WeightSpace today. The MobileFaceNet expression model is built from these blocks and is edited at the bias of its classifier.