maxvit_tiny_cls(pretrained: bool | str = False, weights: MaxViTTinyWeights | None = None, overrides: object = {})MaxViT-Tiny image classifier (Tu et al., 2022).
Combines the maxvit_tiny backbone with the reference
NormMLP classifier head (LayerNorm → Linear + Tanh → final
Linear). Default output is num_classes=1000 (ImageNet-1k).
~31M parameters.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag (MaxViTTinyWeights.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-Tiny config.
Returns
MaxViTForImageClassificationClassifier returning ImageClassificationOutput whose
logits has shape (B, num_classes).
Notes
MaxViT-Tiny reaches 83.6% top-1 on ImageNet-1k at 224x224
(Tu et al., 2022, Table 6). Pretrained weights are converted from
timm's maxvit_tiny_tf_224.in1k and hosted under
lucid-dl/maxvit-tiny.
Examples
>>> import lucid
>>> from lucid.models.vision.maxvit import maxvit_tiny_cls
>>> model = maxvit_tiny_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)