Shortcuts

HybridEmbed

class mmpretrain.models.utils.HybridEmbed(backbone, img_size=224, feature_size=None, in_channels=3, embed_dims=768, conv_cfg=None, init_cfg=None)[源代码]

CNN Feature Map Embedding.

Extract feature map from CNN, flatten, project to embedding dim.

参数:
  • backbone (nn.Module) – CNN backbone

  • img_size (int | tuple) – The size of input image. Default: 224

  • feature_size (int | tuple, optional) – Size of feature map extracted by CNN backbone. Default: None

  • in_channels (int) – The num of input channels. Default: 3

  • embed_dims (int) – The dimensions of embedding. Default: 768

  • conv_cfg (dict, optional) – The config dict for conv layers. Default: None.

  • init_cfg (mmcv.ConfigDict, optional) – The Config for initialization. Default: None.

Read the Docs v: latest
Versions
latest
stable
mmcls-1.x
mmcls-0.x
dev
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.