
visformer_tiny
Image classification306 ops10.3M params
An image classifier that uses convolutional bottleneck blocks early and self-attention in its last two stages.
Image classification · 306 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('visformer_small', pretrained=False) This model is the small size, which the paper names Visformer-S and describes as coming directly from DeiT-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.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@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},
}