maxvit_base_cls(pretrained: bool | str = False, weights: MaxViTBaseWeights | None = None, overrides: object = {})MaxViT-Base image classifier (Tu et al., 2022).
Combines the maxvit_base backbone (depths=(2, 6, 14, 2),
dims=(96, 192, 384, 768)) with the reference NormMLP head.
~119.5M parameters.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag (MaxViTBaseWeights.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-Base config.
Returns
MaxViTForImageClassificationClassifier whose logits has shape (B, num_classes).
Notes
MaxViT-Base reaches 84.9% top-1 on ImageNet-1k at 224x224
(Tu et al., 2022, Table 6). Pretrained weights are converted from
timm's maxvit_base_tf_224.in1k and hosted under
lucid-dl/maxvit-base.
Examples
>>> import lucid
>>> from lucid.models.vision.maxvit import maxvit_base_cls
>>> model = maxvit_base_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)