SwAV¶
- class mmpretrain.models.selfsup.SwAV(backbone, neck=None, head=None, target_generator=None, pretrained=None, data_preprocessor=None, init_cfg=None)[源代码]¶
SwAV.
Implementation of Unsupervised Learning of Visual Features by Contrasting Cluster Assignments.
The queue is built in
mmpretrain/engine/hooks/swav_hook.py
.- loss(inputs, data_samples, **kwargs)[源代码]¶
Forward computation during 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]