All models

ViTSTR-Small

A vit_b_16 Vision Transformer that classifies images from sequences of image patches.

Image classification · 442 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 (34 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
86.6M
Operations
442
Framework
PyTorch
Recurrent
No
Published
2020
Cited by
72,234 (as of 29 November 2026)
Authors
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov and others
License
BSD-3-Clause
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
m3332
Graph hash
b6a9789c7337fef7a8fd20d61129e4e9b2ce0e9718bbba544b1673a058ad369a
Skeleton hash
0168ed7b9edf30ecc7c13aed5dbebca620771f844ffd83797da224e166d1956e
Architecture hash
2791571e092b13893bb9a2024ce96e34c8dc8243066e32300d6eb5385692a3d0
Diagram SHA-256
556580167c3b5d256b115e4bb2da68ac37638a59c4ed2e8de5a75862516a9183
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

torchvision.models.vit_b_16(weights=None)

What it is

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.

  • ViTSTR-Small
  • ViTSTR
  • vision transformer
  • image patches
  • image classification
  • pure transformer
  • patch transformer

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

Cite the paper

@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}, 
}