Skip to content
fn

coatnet_6

→CoAtNet1.3B
coatnet_6(pretrained: bool = False, overrides: object = {})

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

Mixed-stage variant: S3 carries an MBConv sub-stage and a transformer sub-stage at a wider dimension. Spec from paper §A.2 / Table 12:

  • S0 conv stem: D=192, L=2 (handled by stem_width)
  • S1 MBConv: L=2, D=192
  • S2 MBConv: L=4, D=384
  • S3 mixed: MBConv L=8 D=768 → expand→1536 → TFMRel L=42 D=1536
  • S4 TFMRel: L=2, D=2048

1.35B parameters built from Table 12's sizes (Table 5 states 1.47B) — only meaningful with very large pretraining (the paper's headline 88.4-89.0% ImageNet numbers come from JFT-3B pretraining + 512×512 finetune).

Model Size

Parameters

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

Notes

Footprint at default image_size=224 exceeds what a 16 GB host can comfortably instantiate (≈ 6 GB of params alone before activations); use a larger GPU. Building this variant is reserved for inference on dedicated hardware.

Examples

>>> import lucid
>>> from lucid.models.vision.coatnet import coatnet_6
>>> model = coatnet_6()
>>> out = model(lucid.randn(1, 3, 224, 224))
>>> out.last_hidden_state.shape
(1, 2048, 7, 7)

Used by 1