Shortcuts

mmcls.models.utils.SELayer

class mmcls.models.utils.SELayer(channels, squeeze_channels=None, ratio=16, divisor=8, bias='auto', conv_cfg=None, act_cfg=({'type': 'ReLU'}, {'type': 'Sigmoid'}), return_weight=False, init_cfg=None)[源代码]

Squeeze-and-Excitation Module.

参数
  • channels (int) – The input (and output) channels of the SE layer.

  • squeeze_channels (None or int) – The intermediate channel number of SElayer. Default: None, means the value of squeeze_channels is make_divisible(channels // ratio, divisor).

  • ratio (int) – Squeeze ratio in SELayer, the intermediate channel will be make_divisible(channels // ratio, divisor). Only used when squeeze_channels is None. Default: 16.

  • divisor (int) – The divisor to true divide the channel number. Only used when squeeze_channels is None. Default: 8.

  • conv_cfg (None or dict) – Config dict for convolution layer. Default: None, which means using conv2d.

  • return_weight (bool) – Whether to return the weight. Default: False.

  • act_cfg (dict or Sequence[dict]) – Config dict for activation layer. If act_cfg is a dict, two activation layers will be configurated by this dict. If act_cfg is a sequence of dicts, the first activation layer will be configurated by the first dict and the second activation layer will be configurated by the second dict. Default: (dict(type=’ReLU’), dict(type=’Sigmoid’))

Read the Docs v: latest
Versions
master
latest
1.x
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.