swin_small(pretrained: bool = False, overrides: object = {})Swin-Small backbone (Liu et al., 2021).
Builds the canonical Swin-S configuration: embed_dim=96,
depths=(2, 2, 18, 2), num_heads=(3, 6, 12, 24). Same width
as Swin-T but with 18 blocks in stage 3 instead of 6, roughly
doubling the compute. Approximately 50M parameters.
Model Size
Parameters
pretrainedbool= FalseIf
True, loads ImageNet-1k pretrained weights when available.
Defaults to False.**overridesobject= {}Keyword overrides on top of the canonical Swin-S config.
Returns
SwinTransformerA SwinTransformer backbone returning a flat
feature.
Notes
Swin-S reaches 83.0% top-1 on ImageNet-1k (Liu et al., 2021, Table 1).
Examples
>>> import lucid
>>> from lucid.models.vision.swin import swin_small
>>> model = swin_small()
>>> x = lucid.randn(1, 3, 224, 224)
>>> model.forward_features(x).shape
(1, 768)