vit_large_16_cls(pretrained: bool | str = False, weights: ViTLarge16Weights | None = None, overrides: object = {})ViT-Large/16 image classifier (Dosovitskiy et al., 2020).
Combines the vit_large_16 backbone (dim=1024,
depth=24, num_heads=16, patch size 16) with a linear
classification head on the CLS token. Approximately
307M parameters.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag (ViTLarge16Weights.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/16 config.
Returns
ViTForImageClassificationClassifier whose logits has shape (B, num_classes).
Notes
Reference: Dosovitskiy et al. (2020), Table 5. Pretrained weights are
converted from torchvision's ViT_L_16_Weights.IMAGENET1K_V1
(79.662% top-1, 242-pixel resize) and hosted under
lucid-dl/vit-large-16.
Examples
>>> import lucid
>>> from lucid.models.vision.vit import vit_large_16_cls
>>> model = vit_large_16_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)