efficientformer_l1_cls(pretrained: bool | str = False, weights: EfficientFormerL1Weights | None = None, overrides: object = {})EfficientFormer-L1 image classifier (Li et al., 2022).
Combines the efficientformer_l1 backbone with a final
LayerNorm, a mean pool over tokens, and a distilled dual head
(head + head_dist) averaged at inference. Default output is
num_classes=1000 (ImageNet-1k). ~12.3M parameters.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag
(EfficientFormerL1Weights.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 L1 config.
Returns
EfficientFormerForImageClassificationClassifier returning ImageClassificationOutput whose
logits has shape (B, num_classes).
Notes
EfficientFormer-L1 reaches 79.2% top-1 on ImageNet-1k at
MobileNetV2-class latency (Li et al., 2022, Table 4). Pretrained
weights are converted from timm's
efficientformer_l1.snap_dist_in1k and hosted under
lucid-dl/efficientformer-l1.
Examples
>>> import lucid
>>> from lucid.models.vision.efficientformer import efficientformer_l1_cls
>>> model = efficientformer_l1_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)