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

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.