Sahaj.blogs

Day page

4 Dec 2025

Study

Transformers · Vision Transformer (ViT)

ViT treats an image as a sequence of 16×16 patches with a [CLS] token and position embeddings; patch arithmetic, and a pretrained ViT classifying a photo.

  • An image becomes a sequence: cut it into fixed-size patches, flatten each, and project it to a token.
  • A 224×224 image with 16×16 patches gives 196 patch tokens plus one [CLS] token.

Read the post →