swin_large_cls(pretrained: bool | str = False, weights: SwinLargeWeights | None = None, overrides: object = {})Swin-Large image classifier (Liu et al., 2021).
Combines the swin_large backbone (embed_dim=192,
depths=(2, 2, 18, 2)) with a global average pool plus a linear
classification head. Final feature width is . ~197M parameters.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag
(SwinLargeWeights.MS_IN22K_FT_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 Swin-L config.
Returns
SwinTransformerForImageClassificationClassifier whose logits has shape (B, num_classes).
Notes
Swin-L reaches 87.3% top-1 on ImageNet-1k at 384x384
fine-tune resolution after ImageNet-22k pretraining (Liu
et al., 2021, Table 2). The shipped checkpoint is the 224x224
ImageNet-22k → ImageNet-1k finetune (86.3% top-1), converted from
timm's swin_large_patch4_window7_224.ms_in22k_ft_in1k and
hosted under lucid-dl/swin-large.
Examples
>>> import lucid
>>> from lucid.models.vision.swin import swin_large_cls
>>> model = swin_large_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)