
vit_b_16
Image classification442 ops86.6M params
A vit_b_16 Vision Transformer that classifies images from sequences of image patches.
Image classification · 442 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
torchvision.models.vit_b_16(weights=None)
This model is constructed as a vit_b_16 architecture from the paper An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. That paper shows that reliance on CNNs is not necessary in vision: a pure transformer applied directly to sequences of image patches can perform very well on image classification tasks. Before it, the paper says, attention in vision was either applied together with convolutional networks or used to replace certain components of them while keeping their overall structure in place.
The paper reports that Vision Transformer (ViT) does well when pre-trained on large amounts of data and transferred to mid-sized or small image recognition benchmarks, naming ImageNet, CIFAR-100 and VTAB. It adds that ViT requires substantially fewer computational resources to train than the convolutional networks it is compared with. By default the vit_b_16 builder uses no pre-trained weights.
Key idea. The paper showed that a pure transformer applied directly to sequences of image patches can perform very well on image classification without relying on CNNs.
AI-written summary, based on the paper's abstract and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{dosovitskiy2021imageworth16x16words,
title={An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale},
author={Alexey Dosovitskiy and Lucas Beyer and Alexander Kolesnikov and Dirk Weissenborn and Xiaohua Zhai and Thomas Unterthiner and Mostafa Dehghani and Matthias Minderer and Georg Heigold and Sylvain Gelly and Jakob Uszkoreit and Neil Houlsby},
year={2021},
eprint={2010.11929},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2010.11929},
}