efficientformer_l7_cls(pretrained: bool | str = False, weights: EfficientFormerL7Weights | None = None, overrides: object = {})EfficientFormer-L7 image classifier (Li et al., 2022).
Combines the efficientformer_l7 backbone (depths= (6, 6, 18, 8), embed_dims=(96, 192, 384, 768)) with a final
LayerNorm, mean pool, and a distilled dual head (head +
head_dist) averaged at inference. ~82.2M parameters — the
largest EfficientFormer variant.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag
(EfficientFormerL7Weights.SNAP_DIST_IN1K); a tag string
→ that specific checkpoint. Mutually exclusive with weights
(which wins if both are given).Explicit weights enum member. Takes precedence over
pretrained.**overridesobject= {}Keyword overrides on top of the canonical L7 config.
Returns
EfficientFormerForImageClassificationClassifier whose logits has shape (B, num_classes).
Notes
EfficientFormer-L7 reaches 83.3% top-1 on ImageNet-1k (Li
et al., 2022, Table 4) — the headline result of the paper.
Pretrained weights are converted from timm's
efficientformer_l7.snap_dist_in1k and hosted under
lucid-dl/efficientformer-l7.
Examples
>>> import lucid
>>> from lucid.models.vision.efficientformer import efficientformer_l7_cls
>>> model = efficientformer_l7_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)