
cait_xxs24_224
Image classification938 ops12M params
Deeper vision transformer with LayerScale and class-attention layers for image classification
Image classification · 1,370 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
timm.create_model('cait_s36_384', pretrained=False) About this model's family
CaiT stands for Class-Attention in Image Transformers. The paper builds and optimizes deeper transformer networks for image classification. It makes two architecture changes that improve the accuracy of deep transformers.
The first change, LayerScale, is a per-channel multiplication of the vector produced by each residual block, rather than a single scalar. Its diagonal is initialized with small values so that the residual branches contribute little at the start of training. The second change separates the self-attention layers between patches from class-attention layers that extract the processed patches into a single vector for a linear classifier. In the class-attention stage only the class embedding is updated.
The paper reports 86.5% top-1 accuracy on Imagenet when training with no external data. All models are initially trained at resolution 224 and optionally fine-tuned at resolution 384 or trained with distillation.
Key idea. CaiT builds on ViT by adding LayerScale in each residual block and a two-stage design with dedicated class-attention layers.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{touvron2021goingdeeperimagetransformers,
title={Going deeper with Image Transformers},
author={Hugo Touvron and Matthieu Cord and Alexandre Sablayrolles and Gabriel Synnaeve and Hervé Jégou},
year={2021},
eprint={2103.17239},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2103.17239},
}