maxvit_small_cls(pretrained: bool | str = False, weights: MaxViTSmallWeights | None = None, overrides: object = {})MaxViT-Small image classifier (Tu et al., 2022).
Combines the maxvit_small backbone (depths=(2, 2, 5, 2),
dims=(96, 192, 384, 768)) with the reference NormMLP head.
~68.9M parameters.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag (MaxViTSmallWeights.IN1K); a tag
string → that specific checkpoint. Mutually exclusive with
weights (which wins if both are given).Explicit weights enum member. Takes precedence over
pretrained.**overridesobject= {}Keyword overrides on top of the canonical MaxViT-Small config.
Returns
MaxViTForImageClassificationClassifier whose logits has shape (B, num_classes).
Notes
MaxViT-Small reaches 84.5% top-1 on ImageNet-1k at 224x224
(Tu et al., 2022, Table 6). Pretrained weights are converted from
timm's maxvit_small_tf_224.in1k and hosted under
lucid-dl/maxvit-small.
Examples
>>> import lucid
>>> from lucid.models.vision.maxvit import maxvit_small_cls
>>> model = maxvit_small_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)