Shortcuts

MoCoV3

class mmpretrain.models.selfsup.MoCoV3(backbone, neck, head, base_momentum=0.01, pretrained=None, data_preprocessor=None, init_cfg=None)[源代码]

MoCo v3.

Implementation of An Empirical Study of Training Self-Supervised Vision Transformers.

参数:
  • backbone (dict) – Config dict for module of backbone

  • neck (dict) – Config dict for module of deep features to compact feature vectors.

  • head (dict) – Config dict for module of head functions.

  • base_momentum (float) – Momentum coefficient for the momentum-updated encoder. Defaults to 0.01.

  • pretrained (str, optional) – The pretrained checkpoint path, support local path and remote path. Defaults to None.

  • data_preprocessor (dict, optional) – The config for preprocessing input data. If None or no specified type, it will use “SelfSupDataPreprocessor” as type. See SelfSupDataPreprocessor for more details. Defaults to None.

  • init_cfg (Union[List[dict], dict], optional) – Config dict for weight initialization. Defaults to None.

loss(inputs, data_samples, **kwargs)[源代码]

The forward function in training.

参数:
  • inputs (List[torch.Tensor]) – The input images.

  • data_samples (List[DataSample]) – All elements required during the forward function.

返回:

A dictionary of loss components.

返回类型:

Dict[str, torch.Tensor]

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.