Shortcuts

SimMIMHead

class mmpretrain.models.heads.SimMIMHead(patch_size, loss)[源代码]

Head for SimMIM Pre-training.

参数:
  • patch_size (int) – Patch size of each token.

  • loss (dict) – The config for loss.

loss(pred, target, mask)[源代码]

Generate loss.

This method will expand mask to the size of the original image.

参数:
返回:

The reconstruction loss.

返回类型:

torch.Tensor