vit_large_32_cls(pretrained: bool | str = False, weights: ViTLarge32Weights | None = None, overrides: object = {})ViT-Large/32 image classifier (Dosovitskiy et al., 2020).
Combines the vit_large_32 backbone (dim=1024,
depth=24, num_heads=16, patch size 32) with a linear
classification head on the CLS token. The /32 patching gives a
49-token sequence and substantially lowers self-attention cost.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag (ViTLarge32Weights.IMAGENET1K_V1); 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 ViT-Large/32 config.
Returns
ViTForImageClassificationClassifier whose logits has shape (B, num_classes).
Notes
Reference: Dosovitskiy et al. (2020), Table 1. Pretrained weights are
converted from torchvision's ViT_L_32_Weights.IMAGENET1K_V1
(76.972% top-1) and hosted under lucid-dl/vit-large-32.
Examples
>>> import lucid
>>> from lucid.models.vision.vit import vit_large_32_cls
>>> model = vit_large_32_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)