PatchEmbed¶
- class mmpretrain.models.utils.PatchEmbed(img_size=224, in_channels=3, embed_dims=768, norm_cfg=None, conv_cfg=None, init_cfg=None)[source]¶
Image to Patch Embedding.
We use a conv layer to implement PatchEmbed.
- Parameters:
img_size (int | tuple) – The size of input image. Default: 224
in_channels (int) – The num of input channels. Default: 3
embed_dims (int) – The dimensions of embedding. Default: 768
norm_cfg (dict, optional) – Config dict for normalization layer. Default: None
conv_cfg (dict, optional) – The config dict for conv layers. Default: None
init_cfg (mmcv.ConfigDict, optional) – The Config for initialization. Default: None