Shortcuts

ClsBatchNormNeck

class mmpretrain.models.necks.ClsBatchNormNeck(input_features, affine=False, eps=1e-06, init_cfg=None)[source]

Normalize cls token across batch before head.

This module is proposed by MAE, when running linear probing.

Parameters:
  • input_features (int) – The dimension of features.

  • affine (bool) – a boolean value that when set to True, this module has learnable affine parameters. Defaults to False.

  • eps (float) – a value added to the denominator for numerical stability. Defaults to 1e-6.

  • init_cfg (Dict or List[Dict], optional) – Config dict for weight initialization. Defaults to None.

forward(inputs)[source]

The forward function.

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.