Shortcuts

BEiTV1Head

class mmpretrain.models.heads.BEiTV1Head(embed_dims, num_embed, loss, init_cfg={'bias': 0, 'layer': 'Linear', 'std': 0.02, 'type': 'TruncNormal'})[源代码]

Head for BEiT v1 Pre-training.

Compute the logits and the cross entropy loss.

参数:
  • embed_dims (int) – The dimension of embedding.

  • num_embed (int) – The number of classification types.

  • loss (dict) – The config of loss.

  • init_cfg (dict or List[dict], optional) – Initialization config dict. Defaults to None.

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

Generate loss.

参数:
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.