Skip to content
fn

coatnet_7

→CoAtNet2.4B
coatnet_7(pretrained: bool = False, overrides: object = {})

CoAtNet-7 backbone (Dai et al., 2021).

Widest mixed-stage variant. Spec from paper §A.2 / Table 12:

  • S0 conv stem: D=192, L=2
  • S1 MBConv: L=2, D=256
  • S2 MBConv: L=4, D=512
  • S3 mixed: MBConv L=8 D=1024 → expand→2048 → TFMRel L=42 D=2048
  • S4 TFMRel: L=2, D=3072

Approximately 2.4B parameters — paper's strongest published CoAtNet, only usable with JFT-3B pretraining. Not buildable on a 16 GB host (param footprint alone is ≈ 9.7 GB before activations).

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for coatnet_7, so True raises NotImplementedError rather than return randomly initialised weights.
**overridesobject= {}
Keyword overrides applied on top of the canonical CoAtNet-7 config; each must name a field of CoAtNetConfig (e.g. image_size=384, in_channels=1).

Examples

>>> import lucid
>>> from lucid.models.vision.coatnet import coatnet_7
>>> model = coatnet_7()
>>> out = model(lucid.randn(1, 3, 224, 224))
>>> out.last_hidden_state.shape
(1, 3072, 7, 7)
Two and a half billion parameters — the largest variant in the
paper, and worth knowing before instantiating one.

Used by 1