mobilenet_v4_hybrid_large_cls(pretrained: bool | str = False, weights: MobileNetV4HybridLargeWeights | None = None, overrides: object = {})MobileNet-v4-Hybrid-Large image classifier.
Builds a MobileNetV4ForImageClassification with the Hybrid-Large
architecture (Qin et al., 2024, Appendix D, Table 15) and the
post-pool head (960 → 1280 → classes). 37.76 M parameters;
Table 6 reports 83.4% ImageNet-1k top-1 at 35.9 M parameters and
7.2 G MACs. Classifier dropout defaults to the paper's 0.2
(Table 10).
Model Size
Parameters
pretrainedbool or str= FalseFalse → random init; True → the
DEFAULT tag
(MobileNetV4HybridLargeWeights.IX_E600_R384_IN1K); a tag
string (e.g. "IX_E600_R384_IN1K") → that specific checkpoint.
Mutually exclusive with weights (which wins if both are given).MobileNetV4HybridLargeWeights.IX_E600_R384_IN1K. Takes
precedence over pretrained.**overridesobject= {}MobileNetV4Config
(typically num_classes to retarget the head). Overriding
num_classes away from the checkpoint's 1000 makes pretrained
loading fail the strict key/shape check — load with the
matching head, then call reset_classifier.Returns
MobileNetV4ForImageClassificationClassifier with the Hybrid-Large configuration (plus overrides),
optionally initialised from pretrained weights.
Notes
Qin et al., "MobileNetV4: Universal Models for the Mobile Ecosystem", ECCV 2024 (arXiv:2404.10518). Parameter names match timm's implementation, so its ImageNet-1k checkpoints load with an identity key map. The paper evaluates this variant at 384x384.
Pretrained weights are converted from timm's
mobilenetv4_hybrid_large.ix_e600_r384_in1k — timm's own ImageNet-1k
training of this architecture, trained at 384x384; the authors released
none — and hosted on the Hugging Face Hub under
lucid-dl/mobilenet-v4-hybrid-large. timm reports 83.996% top-1 /
96.714% top-5 for it at 384x384 with the preset that
MobileNetV4HybridLargeWeights.IX_E600_R384_IN1K.transforms
reproduces (384 crop, 404 resize, bicubic, ImageNet mean/std).
Examples
>>> import lucid
>>> from lucid.models.vision.mobilenet_v4 import mobilenet_v4_hybrid_large_cls
>>> model = mobilenet_v4_hybrid_large_cls(num_classes=10).eval()
>>> model(lucid.randn(2, 3, 224, 224)).logits.shape
(2, 10)
Load ImageNet-pretrained weights:
>>> model = mobilenet_v4_hybrid_large_cls(pretrained=True)
>>> from lucid.models.weights import MobileNetV4HybridLargeWeights
>>> model = mobilenet_v4_hybrid_large_cls(
... weights=MobileNetV4HybridLargeWeights.IX_E600_R384_IN1K
... )