Skip to content
fn

coatnet_4_cls

→CoAtNetForImageClassification275M
coatnet_4_cls(pretrained: bool = False, overrides: object = {})

CoAtNet-4 image classifier (Dai et al., 2021).

Deepest of the CoAtNet-0..4 series — same dims as CoAtNet-3 but with blocks_per_stage=(2, 12, 28, 2). Approximately 275M parameters, 85.0% ImageNet-1k top-1 at 224x224 (Table 5).

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for coatnet_4_cls, so True raises NotImplementedError rather than return randomly initialised weights.
**overridesobject= {}
Keyword overrides applied on top of the canonical CoAtNet-4 config; each must name a field of CoAtNetConfig (e.g. num_classes=10 to retarget the head).

Examples

>>> import lucid
>>> from lucid.models.vision.coatnet import coatnet_4_cls
>>> model = coatnet_4_cls()
>>> out = model(lucid.randn(1, 3, 224, 224))
>>> out.logits.shape
(1, 1000)

Used by 1