Skip to content
fn

mobilenet_v3_large_cls

→MobileNetV3ForImageClassification5.5M
mobilenet_v3_large_cls(pretrained: bool | str = False, weights: MobileNetV3LargeWeights | None = None, overrides: object = {})

MobileNet-v3-Large image classifier with the redesigned head.

Builds a MobileNetV3ForImageClassification with the Large topology (Howard et al., 2019) plus the redesigned inverted classification head (GAP → 1×1 Conv → h-swish → Flatten → Dropout → Linear). Approximately 5.4M parameters and 75.2% ImageNet-1k top-1 accuracy (Table 3).

Model Size

Parameters

pretrainedbool or str= False
Pretrained-weight selector. False → random init; True → the DEFAULT tag (MobileNetV3LargeWeights.IMAGENET1K_V1); a tag string → that specific checkpoint. Mutually exclusive with weights (which wins if both are given).
weights(MobileNetV3LargeWeights, optional, keyword - only)= None
Explicit weights enum member. Takes precedence over pretrained.
**overridesobject= {}
Keyword overrides forwarded into MobileNetV3Config (typically num_classes to retarget the classifier).

Returns

MobileNetV3ForImageClassification

Classifier with the MobileNet-v3-Large configuration applied (or with overrides merged on top of it), optionally initialised from pretrained weights.

Notes

See Howard et al., "Searching for MobileNetV3", ICCV 2019 (arXiv:1905.02244), Table 1 and Table 3. Pretrained weights are converted from reference_vision's MobileNet_V3_Large_Weights and hosted on the Hugging Face Hub under lucid-dl/mobilenet-v3-large.

Examples

>>> import lucid
>>> from lucid.models.vision.mobilenet_v3 import mobilenet_v3_large_cls
>>> model = mobilenet_v3_large_cls(num_classes=10)
>>> x = lucid.randn(2, 3, 224, 224)
>>> out = model(x)
>>> out.logits.shape
(2, 10)
Load ImageNet-pretrained weights:
>>> model = mobilenet_v3_large_cls(pretrained=True)
>>> from lucid.models.weights import MobileNetV3LargeWeights
>>> model = mobilenet_v3_large_cls(weights=MobileNetV3LargeWeights.IMAGENET1K_V1)

Used by 1