MobileNet v3 feature-extracting backbone (no classification head).
Implements the NAS-designed topology from Howard et al., "Searching for MobileNetV3", ICCV 2019 (arXiv:1905.02244). The architecture combines MobileNet-v2's inverted-residual block with three new ingredients selected by a platform-aware architecture search: a lightweight squeeze-and-excitation module in selected blocks, the hard-swish activation () in the deeper half of the network, and a redesigned head that moves the expensive 1×1 expansion after the global average pool.
Two hand-tuned variants are exposed: "large" (15 blocks,
targeting higher-accuracy mobile deployments) and "small"
(11 blocks, targeting tight latency budgets). Channel counts
scale uniformly with config.width_mult.
Parameters
configMobileNetV3Configmobilenet_v3_large, mobilenet_v3_small) for
paper-cited variants.Attributes
configMobileNetV3Configfeaturesnn.Sequential- 1×1 penultimate expansion. Channel counts scale with
config.width_mult.
avgpoolnn.AdaptiveAvgPool2d(B, C, 1, 1).feature_infolist[FeatureInfo]BackboneMixin for downstream FPN / decoder
modules.Notes
The hard-swish activation,
closely approximates swish/SiLU using only piecewise-linear primitives, making it dramatically cheaper to evaluate on mobile-friendly fixed-point hardware. Combined with the redesigned tail (moving the 1×1 expansion to operate on a single spatial location after global average pooling), the overall network achieves higher ImageNet top-1 accuracy than MobileNet-v2 at lower latency on a Pixel-1 CPU.
Examples
Build a MobileNet-v3-Large backbone and run a forward pass:
>>> import lucid
>>> from lucid.models.vision.mobilenet_v3 import mobilenet_v3_large
>>> backbone = mobilenet_v3_large()
>>> x = lucid.randn(2, 3, 224, 224)
>>> out = backbone(x)
>>> out.last_hidden_state.shape
(2, 960, 1, 1)Used by 2
Constructors
1Properties
1feature_info: list[FeatureInfo]