All models

visformer_tiny

An image classifier that uses convolutional bottleneck blocks early and self-attention in its last two stages.

Image classification · 306 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 (25 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

Parameters
10.3M
Operations
306
Framework
PyTorch
Recurrent
No
Published
ICCV (arXiv 2021)
Cited by
253 (as of 9 October 2026)
Authors
Zhengsu Chen, Lingxi Xie, Jianwei Niu 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
m10912
Graph hash
d466053cc049a879768f11f9dee080625d652bf331895524695f6ed772495a98
Skeleton hash
cd6d23cbd2986e5bf38393e9befc6f9adc2bfe46373a175fa11a7d2f030fe0bb
Architecture hash
a719ee527e1984dc0262bbb1460cb0c6467ffeb11d047f9c656711ba502767b1
Diagram SHA-256
58f1c6da121d64a6af8b0d0f506e31d3fe21f2a69a8a074a9df18982e8b0b41a
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('visformer_tiny', pretrained=False)

What it is

This model is the tiny size, which the paper names Visformer-Ti and derives by shrinking the attention dimensionality by half, for around 1/4 of the computational cost of Visformer-S.

About this model's family

Visformer is an image classification network whose name is short for Vision-friendly Transformer. It came out of an empirical study that turns a Transformer-based model into a convolution-based model one step at a time. The study walks from DeiT-S to ResNet-50 in eight steps.

Visformer keeps the steps that helped and also adopts the stage-wise design for higher base performance. Self-attention is used only in the last two stages, because the paper considers it relatively inefficient at high resolution. The first stage instead uses bottleneck blocks with group 3 × 3 convolutions, a choice the paper says was inspired by ResNeXt. BatchNorm is used in the patch embedding modules, as in CNNs.

The model's complexity is adjusted by changing the output dimensionality of the multi-head attentions. On ImageNet classification, with the training setting the paper calls elite, the paper reports that Visformer-S outperforms DeiT-S and ResNet-50 by 2.12% and 3.46%.

Key idea. The paper converted DeiT-S into ResNet-50 step by step, identified which design choices help visual recognition, and combined them into the Visformer architecture.

  • visformer
  • vision-friendly transformer
  • visformer-s
  • visformer-ti
  • visformer_small
  • visformer_tiny
  • vision transformer
  • image classification

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

Cite the paper

@misc{chen2021visformervisionfriendlytransformer,
      title={Visformer: The Vision-friendly Transformer}, 
      author={Zhengsu Chen and Lingxi Xie and Jianwei Niu and Xuefeng Liu and Longhui Wei and Qi Tian},
      year={2021},
      eprint={2104.12533},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2104.12533}, 
}