Skip to content
fn

efficientformer_l7

→EfficientFormer80.7M
efficientformer_l7(pretrained: bool = False, overrides: object = {})

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

Builds the canonical EfficientFormer-L7 configuration: depths=(6, 6, 18, 8), embed_dims=(96, 192, 384, 768), drop_path_rate=0.2. 80.7M parameters headless (82.2M with the classification heads) — the largest variant in the paper.

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for efficientformer_l7, so True raises NotImplementedError rather than return randomly initialised weights. efficientformer_l7_cls is the checkpointed variant.
**overridesobject= {}
Keyword overrides on top of the canonical L7 config.

Returns

EfficientFormer

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

Notes

EfficientFormer-L7 reaches 83.3% top-1 on ImageNet-1k (Li et al., 2022, Table 4) — the headline result of the paper.

Examples

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

Used by 1