
cvt (base vision transformer)
Image classification646 ops19.6M params
CvT folds convolutions into a vision transformer for local detail plus global attention.
Image classification · 649 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
transformers.AutoModelForImageClassification.from_config()
CvtForImageClassification is the image-classification variant; the ViT notebooks apply with ViTForImageClassification replaced by CvtForImageClassification.
About this model's family
CvT, the Convolutional Vision Transformer, combines the strengths of convolutional neural networks and vision transformers for computer vision tasks. It introduces convolutional layers into the vision transformer architecture, so it can capture local patterns in images while keeping the global context that self-attention provides.
All the CvT checkpoints live under the Microsoft organization on the Hub. The documented example classifies an image through Pipeline or the AutoModel class.
Key idea. Convolutional layers inside a vision transformer, capturing local image patterns while keeping the global context of self-attention.
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.