ConditionalPositionEncoding¶
- class mmpretrain.models.utils.ConditionalPositionEncoding(in_channels, embed_dims=768, stride=1, init_cfg=None)[source]¶
The Conditional Position Encoding (CPE) module.
The CPE is the implementation of ‘Conditional Positional Encodings for Vision Transformers <https://arxiv.org/abs/2102.10882>’_.