Shortcuts

GeneralizedMeanPooling

class mmpretrain.models.necks.GeneralizedMeanPooling(p=3.0, eps=1e-06, clamp=True, p_trainable=True)[source]

Generalized Mean Pooling neck.

Note that we use view to remove extra channel after pooling. We do not use squeeze as it will also remove the batch dimension when the tensor has a batch dimension of size 1, which can lead to unexpected errors.

Parameters:
  • p (float) – Parameter value. Defaults to 3.

  • eps (float) – epsilon. Defaults to 1e-6.

  • clamp (bool) – Use clamp before pooling. Defaults to True

  • p_trainable (bool) – Toggle whether Parameter p is trainable or not. Defaults to True.

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.