Patch Embedding
What is Patch Embedding?
In one sentence: Patch embedding is the step that cuts an image into small squares and turns each square into an embedding.
A Vision Transformer cannot read pixels one by one, so it slices the image into patches, like 16 by 16 pixels each. Each patch is flattened and converted into a vector, forming a sequence of tokens.
What does Patch Embedding look like?
A 224×224 image cut into 16×16 patches gives 196 patch embeddings.
Why does Patch Embedding matter?
It is how Transformers turn pictures into something they can read.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/patch-embedding/">Patch Embedding, explained simply</a> (The AI Math Dictionary)