All models

cait_xxs24_224

Deeper vision transformer with LayerScale and class-attention layers for image classification

Image classification · 938 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (22 KB)

Open in a new tab

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.

At a glance

Family
cait
Parameters
12M
Operations
938
Framework
PyTorch
Recurrent
No
Published
ICCV (arXiv 2021)
Cited by
1,148 (as of 9 October 2026)
Authors
Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m3739
Graph hash
0dc18b1e74173e05ebb69c991c851565fa57dbcd5de3a6fdea0d2ef27d6f5686
Skeleton hash
4c452912b83e1e358388de441078bee21f0003817c68cf5a0dc1b042da231c73
Architecture hash
6e643cd3aa00d4c7028ebf07506ca7e57a7b90bd59e3032ef8e81a2bf43c6541
Diagram SHA-256
48d4863452a92f0a520bc77e00cbe8731e7182aff3c5aba327ff2df4ccd61f18
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

timm.create_model('cait_xxs24_224', pretrained=False)

What it is

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.

  • class-attention
  • LayerScale
  • deep image transformer
  • image classification
  • residual block scaling
  • class embedding
  • self-attention
  • ImageNet
  • fine-tuning at 384
  • distillation

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@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}, 
}