Rethinking and Improving Relative Position Encoding for ...
arxiv.org › abs › 2107Jul 29, 2021 · We then propose new relative position encoding methods dedicated to 2D images, called image RPE (iRPE). Our methods consider directional relative distance modeling as well as the interactions between queries and relative position embeddings in self-attention mechanism. The proposed iRPE methods are simple and lightweight.