MobileNet V2
8 memberslucid.models.vision.mobilenet_v2MobileNet v2 family — Sandler et al., 2018.
Sandler, Mark, et al. "MobileNetV2: Inverted Residuals and Linear Bottlenecks." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018, pp. 4510–4520.
MobileNet-v2 replaces the plain depthwise-separable stack of v1 with the inverted residual bottleneck block. Each block receives a low-dimensional tensor of channels, projects it up to a much wider channel space with a convolution, applies a depthwise convolution in that expanded space, then projects back down to channels with another . When the input and output shapes match, an identity shortcut is added around the whole block:
This is the inverse of the classical bottleneck shape (which is wide → narrow → wide), and is why the authors call it an "inverted residual".
The second insight is the linear bottleneck. The final projection is followed by no non-linearity — a deliberate departure from the ReLU-after-every-conv pattern. The paper's manifold argument shows that ReLU on a low-dimensional activation collapses information that cannot be recovered; keeping the bottleneck output linear preserves the representational capacity of the narrow channels while still letting the wide interior of the block use ReLU6 freely.
These two ideas together give a network that, at comparable accuracy to MobileNet-v1, uses roughly fewer parameters and fewer multiply-adds, and runs measurably faster on mobile CPUs. As with v1, a single width multiplier scales every channel count uniformly, exposing the same accuracy/latency trade-off curve without retraining.
Classes
Functions
mobilenet_v2→ MobileNetV2MobileNet-v2 backbone at width multiplier .
mobilenet_v2_cls→ MobileNetV2ForImageClassificationMobileNet-v2 image classifier at width multiplier .
mobilenet_v2_075→ MobileNetV2MobileNet-v2 backbone at width multiplier .
mobilenet_v2_075_cls→ MobileNetV2ForImageClassificationMobileNet-v2 image classifier at width multiplier .