vit_huge_14_cls(pretrained: bool = False, overrides: object = {})ViT-Huge/14 image classifier (Dosovitskiy et al., 2020).
Combines the vit_huge_14 backbone (dim=1280, depth=32,
num_heads=16, patch size 14) with a linear classification head on
the CLS token. Approximately 632M parameters — the largest ViT
variant in the paper.
Model Size
Parameters
pretrainedbool= FalseIf
True, loads JFT-300M / ImageNet-21k pretrained weights when
available. Defaults to False.**overridesobject= {}Keyword overrides on top of the canonical ViT-Huge/14 config.
Returns
ViTForImageClassificationClassifier whose logits has shape (B, num_classes).
Notes
Achieves 88.55% top-1 on ImageNet-1k at 518x518 fine-tune resolution after JFT-300M pretraining (Dosovitskiy et al., 2020, Table 2) — the headline result of the paper.
Examples
>>> import lucid
>>> from lucid.models.vision.vit import vit_huge_14_cls
>>> model = vit_huge_14_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)