convnext_xlarge_cls(pretrained: bool | str = False, weights: ConvNeXtXLargeWeights | None = None, overrides: object = {})ConvNeXt-XLarge image classifier (Liu et al., 2022).
Combines the convnext_xlarge backbone (depths=(3, 3, 27, 3),
dims=(256, 512, 1024, 2048)) with a global average pool +
LayerNorm + linear classification head. ~350M parameters — the
largest ConvNeXt variant in the paper.
Model Size
Parameters
pretrainedbool= FalseIf
True, loads ImageNet-22k pretrained weights when
available. Defaults to False.Explicit weights enum member; takes precedence over
pretrained.**overridesobject= {}Keyword overrides on top of the canonical ConvNeXt-XL config.
Returns
ConvNeXtForImageClassificationClassifier whose logits has shape (B, num_classes).
Notes
ConvNeXt-XL reaches 87.0% top-1 on ImageNet-1k at 384x384 fine-tune resolution after ImageNet-22k pretraining (Liu et al., 2022, Table 11) — the headline result of the paper.
Examples
>>> import lucid
>>> from lucid.models.vision.convnext import convnext_xlarge_cls
>>> model = convnext_xlarge_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)
Load ImageNet-22k-pretrained-then-1k-finetuned weights:
>>> model = convnext_xlarge_cls(pretrained=True)
>>> from lucid.models.weights import ConvNeXtXLargeWeights
>>> model = convnext_xlarge_cls(weights=ConvNeXtXLargeWeights.FB_IN22K_FT_IN1K)