braindecode.modules.SqueezeAndExcitation#

class braindecode.modules.SqueezeAndExcitation(in_channels: int, reduction_rate: int, bias: bool = False)[source]#

Squeeze-and-Excitation Networks from [Hu2018].

Parameters:
  • in_channels (int,) – number of input feature channels.

  • reduction_rate (int,) – reduction ratio of the fully-connected layers.

  • bias (bool, default=False) – if True, adds a learnable bias will be used in the convolution.

References

[Hu2018]

Hu, J., Albanie, S., Sun, G., Wu, E., 2018.

Squeeze-and-Excitation Networks. CVPR 2018.

Methods

forward(x)[source]#

Apply the Squeeze-and-Excitation block to the input tensor.

Parameters:

x (Pytorch.Tensor)

Returns:

scale*x

Return type:

Pytorch.Tensor