efficientnet_b7_cls(pretrained: bool | str = False, weights: EfficientNetB7Weights | None = None, overrides: object = {})EfficientNet-B7 image classifier (backbone + GAP + linear head).
Builds an EfficientNetForImageClassification with the
B7 compound-scaling configuration (width × 2.0, depth × 3.1)
followed by dropout () and a linear classifier —
the largest variant in the original paper. Approximately
66M parameters and 84.4% ImageNet-1k top-1 accuracy at
600×600 (Tan & Le, 2019, Table 2), state-of-the-art at the
time of publication.
Model Size
Parameters
pretrainedbool or str= FalseFalse → random init; True
→ the DEFAULT tag
(EfficientNetB7Weights.IMAGENET1K_V1); a tag string →
that specific checkpoint. Mutually exclusive with weights.pretrained.**overridesobject= {}EfficientNetConfig.Returns
EfficientNetForImageClassificationClassifier with the B7 configuration applied (or with
overrides merged on top of it), optionally initialised from
pretrained weights.
Notes
See Tan & Le, "EfficientNet: Rethinking Model Scaling for
Convolutional Neural Networks", ICML 2019 (arXiv:1905.11946),
Table 2. At 600×600 input resolution memory usage is
substantial — plan inference accordingly. Pretrained weights are
converted from the reference-framework EfficientNet_B7_Weights
and hosted under lucid-dl/efficientnet-b7.
Examples
>>> import lucid
>>> from lucid.models.vision.efficientnet import efficientnet_b7_cls
>>> model = efficientnet_b7_cls(pretrained=True)
>>> x = lucid.randn(1, 3, 600, 600)
>>> out = model(x)
>>> out.logits.shape
(1, 1000)