Shortcuts

SimMIMHead

class mmpretrain.models.heads.SimMIMHead(patch_size, loss)[source]

Head for SimMIM Pre-training.

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

  • loss (dict) – The config for loss.

loss(pred, target, mask)[source]

Generate loss.

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

Parameters:
Returns:

The reconstruction loss.

Return type:

torch.Tensor

Read the Docs v: latest
Versions
latest
stable
mmcls-1.x
mmcls-0.x
dev
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.