LayerScale¶
- class mmcls.models.utils.LayerScale(dim, inplace=False, data_format='channels_last')[源代码]¶
LayerScale layer.
- 参数
dim (int) – Dimension of input features.
inplace (bool) – inplace: can optionally do the operation in-place. Defaults to False.
data_format (str) – The input data format, could be ‘channels_last’ or ‘channels_first’, representing (B, C, H, W) and (B, N, C) format data respectively. Defaults to ‘channels_last’.