braindecode.modules.CBAM#

class braindecode.modules.CBAM(in_channels: int, reduction_rate: int, kernel_size: int)[source]#

Convolutional Block Attention Module from [Woo2018].

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

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

  • kernel_size (int) – kernel size of the convolutional layer

References

[Woo2018]

Woo, S., Park, J., Lee, J., Kweon, I., 2018.

CBAM: Convolutional Block Attention Module. ECCV 2018.

Methods

forward(x)[source]#

Apply the Convolutional Block Attention Module to the input tensor.

Parameters:

x (Pytorch.Tensor)

Return type:

Pytorch.Tensor