Views
No views yet
Liu et al., 2021 — Swin Transformer: Hierarchical Vision Transformer using Shifted Windows (arXiv:2103.14030)
torchvision/Swin_B_Weights.IMAGENET1K_V1,
converted to Lucid-native safetensors.| Tag | acc@1 | acc@5 | Params | GFLOPs | Size | Source |
|---|---|---|---|---|---|---|
IMAGENET1K_V1 (default) | 83.582 | 96.64 | 87.8M | 15.431 | 334.84 MB | torchvision |
1import lucid.models as models
2from lucid.models.weights import SwinBaseWeights
3
4# default tag
5model = models.swin_base_cls(pretrained=True)
6
7# explicit tag (enum or string)
8model = models.swin_base_cls(weights=SwinBaseWeights.IMAGENET1K_V1)
9model = models.swin_base_cls(pretrained="IMAGENET1K_V1")
10
11# preprocessing travels with the weights
12weights = SwinBaseWeights.IMAGENET1K_V1
13preprocess = weights.transforms()
14logits = model(preprocess(image)[None]).logitstorchvision/Swin_B_Weights.IMAGENET1K_V1 via
python -m tools.convert_weights swin_base --tag IMAGENET1K_V1.
Key mapping + numerical parity verified against the source.mit — inherited from the original weights.@inproceedings{liu2021swin,
title={Swin Transformer: Hierarchical Vision Transformer using Shifted Windows},
author={Liu, Ze and Lin, Yutong and Cao, Yue and Hu, Han and Wei, Yixuan and Zhang, Zheng and Lin, Stephen and Guo, Baining},
booktitle={ICCV}, year={2021}
}