MaskFeat¶
- class mmpretrain.models.selfsup.MaskFeat(backbone, neck=None, head=None, target_generator=None, pretrained=None, data_preprocessor=None, init_cfg=None)[source]¶
MaskFeat.
Implementation of Masked Feature Prediction for Self-Supervised Visual Pre-Training.
- loss(inputs, data_samples, **kwargs)[source]¶
The forward function in training.
- Parameters:
inputs (torch.Tensor) – The input images.
data_samples (List[DataSample]) – All elements required during the forward function.
- Returns:
A dictionary of loss components.
- Return type:
Dict[str, torch.Tensor]