- class mmpretrain.models.heads.SparKPretrainHead(loss, norm_pix=True, patch_size=32)¶
Pre-training head for SparK.
Construct the reconstruction target.
In addition to splitting images into tokens, this module will also normalize the image according to
norm_pix. :param target: Image with the shape of B x 3 x H x W :type target: torch.Tensor
Tokenized images with the shape of B x L x C
- Return type:
- forward(pred, target, active_mask)¶
Forward function of MAE head.