All models

cvt (image classification)

CvT folds convolutions into a vision transformer for local detail plus global attention.

Image classification · 649 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
cvt
Parameters
19.6M
Operations
649
Framework
PyTorch
Recurrent
No
Name in source
cvt:image-classification
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
m3999
Graph hash
62671acd55699068f0f9c228f632d72021e72d683edf5dc586fdbdc127c53e93
Skeleton hash
175c47719fa7d51e3c1c32e12b293a6a5bcb0d686b29ab49f71556a1877dfba8
Architecture hash
3512311d79bfb2c5b444be9d4728132ee02e4fe57c27976736374f1d38d1e2dc
Diagram SHA-256
0479d7889783690964449314d21206c3b7977df3e6e25e680349fcc72f3cd111
TorchLens version
2.36.0
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

transformers.AutoModelForImageClassification.from_config()

What it is

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.

  • cvt
  • convolutional vision transformer
  • cvt-13
  • image classification
  • microsoft
  • hybrid cnn transformer

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