Skip to content
fn

coatnet_1

→CoAtNet40.9M
coatnet_1(pretrained: bool = False, overrides: object = {})

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

Same channel widths as CoAtNet-0 but with substantially deeper stages: blocks_per_stage=(2, 6, 14, 2), dims=(96, 192, 384, 768), stem_width=64, attn_heads=(12, 24). Approximately 42M parameters.

Model Size

Parameters

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

Notes

Reaches 83.3% ImageNet-1k top-1 at 224×224 (Table 5, NeurIPS 2021). See arXiv:2106.04803.

Examples

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

Used by 1