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.