What is: Positional Encoding Generator?
Source | Conditional Positional Encodings for Vision Transformers |
Year | 2000 |
Data Source | CC BY-SA - https://paperswithcode.com |
Positional Encoding Generator, or PEG, is a module used in the Conditional Position Encoding position embeddings. It dynamically produce the positional encodings conditioned on the local neighborhood of an input token. To condition on the local neighbors, we first reshape the flattened input sequence of DeiT back to in the 2 -D image space. Then, a function (denoted by in the Figure) is repeatedly applied to the local patch in to produce the conditional positional encodings PEG can be efficiently implemented with a 2-D convolution with kernel and zero paddings. Note that the zero paddings here are important to make the model be aware of the absolute positions, and can be of various forms such as separable convolutions and many others.