braindecode.modules.SRM#

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

Attention module from [Lee2019].

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

  • use_mlp (bool, default=False) – whether to use fully-connected layers instead of a convolutional layer,

  • reduction_rate (int, default=4) – reduction ratio of the fully-connected layers (if used),

References

[Lee2019]

Lee, H., Kim, H., Nam, H., 2019. SRM: A Style-based

Recalibration Module for Convolutional Neural Networks. ICCV 2019.

Methods

forward(x)[source]#

Apply the Style-based Recalibration Module to the input tensor.

Parameters:

x (Pytorch.Tensor)

Return type:

Pytorch.Tensor