CoAtNet-2 backbone (Dai et al., 2021).
Wider variant: blocks_per_stage=(2, 6, 14, 2),
dims=(128, 256, 512, 1024), stem_width=128,
attn_heads=(16, 32). Approximately 75M parameters, 84.1%
ImageNet-1k top-1 at 224×224 (Table 5).
Model Size
Parameters
pretrainedbool= FalseNo checkpoint is published for
coatnet_2, so True raises
NotImplementedError rather than return randomly initialised weights.**overridesobject= {}Keyword overrides applied on top of the canonical CoAtNet-2
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_2
>>> model = coatnet_2()
>>> out = model(lucid.randn(1, 3, 224, 224))
>>> out.last_hidden_state.shape
(1, 1024, 7, 7)