MixMIMPretrainHead¶
- class mmpretrain.models.heads.MixMIMPretrainHead(loss, norm_pix=False, patch_size=16)[source]¶
Head for MixMIM Pre-training.
- Parameters:
- loss(x_rec, target, mask)[source]¶
Generate loss.
- Parameters:
pred (torch.Tensor) – The reconstructed image.
target (torch.Tensor) – The target image.
mask (torch.Tensor) – The mask of the target image.
- Returns:
The reconstruction loss.
- Return type: