Skip to content
fn

efficientformer_l1

→EfficientFormer11.4M
efficientformer_l1(pretrained: bool = False, overrides: object = {})

EfficientFormer-L1 backbone (Li et al., 2022).

Builds the canonical EfficientFormer-L1 configuration: depths=(3, 2, 6, 4), embed_dims=(48, 96, 224, 448), mlp_ratios=(4.0, 4.0, 4.0, 4.0), drop_path_rate=0.0. 11.4M parameters headless (12.3M with the classification heads) — the smallest, lowest-latency variant in the paper.

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for efficientformer_l1, so True raises NotImplementedError rather than return randomly initialised weights. efficientformer_l1_cls is the checkpointed variant.
**overridesobject= {}
Keyword overrides on top of the canonical L1 config. Each override must match a field of EfficientFormerConfig.

Returns

EfficientFormer

An EfficientFormer backbone returning a flat (B,448)(B, 448) feature.

Notes

EfficientFormer-L1 reaches 79.2% top-1 on ImageNet-1k at MobileNetV2-class on-device latency (Li et al., 2022, Table 4). See arXiv:2206.01191.

Examples

>>> import lucid
>>> from lucid.models.vision.efficientformer import efficientformer_l1
>>> model = efficientformer_l1()
>>> x = lucid.randn(1, 3, 224, 224)
>>> feat = model.forward_features(x)
>>> feat.shape
(1, 448)

Used by 1