Views
No views yet
Wu et al., 2021 — CvT: Introducing Convolutions to Vision Transformers (arXiv:2103.15808)
transformers/microsoft/cvt-21,
converted to Lucid-native safetensors.| Tag | acc@1 | acc@5 | Params | GFLOPs | Size | Source |
|---|---|---|---|---|---|---|
IN1K (default) | 82.5 | — | 31.6M | — | 120.87 MB | transformers |
1import lucid.models as models
2from lucid.models.weights import CvT21Weights
3
4# default tag
5model = models.cvt_21_cls(pretrained=True)
6
7# explicit tag (enum or string)
8model = models.cvt_21_cls(weights=CvT21Weights.IN1K)
9model = models.cvt_21_cls(pretrained="IN1K")
10
11# preprocessing travels with the weights
12weights = CvT21Weights.IN1K
13preprocess = weights.transforms()
14logits = model(preprocess(image)[None]).logitstransformers/microsoft/cvt-21 via
python -m tools.convert_weights cvt_21 --tag IN1K.
Key mapping + numerical parity verified against the source.apache-2.0 — inherited from the original weights.@inproceedings{wu2021cvt,
title={CvT: Introducing Convolutions to Vision Transformers},
author={Wu, Haiping and Xiao, Bin and Codella, Noel and Liu, Mengchen and Dai, Xiyang and Yuan, Lu and Zhang, Lei},
booktitle={ICCV}, year={2021}
}