braindecode.modules.CATLite#

class braindecode.modules.CATLite(in_channels, reduction_rate, bias=True)[source]#

Modification of CAT without the convolutional layer from [Wu2023].

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

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

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

Examples

>>> import torch
>>> from braindecode.modules import CATLite
>>> module = CATLite(in_channels=16, reduction_rate=4)
>>> inputs = torch.randn(2, 16, 1, 64)
>>> outputs = module(inputs)
>>> outputs.shape
torch.Size([2, 16, 1, 64])

References

[Wu2023]

Wu, Z. et al., 2023 CAT: Learning to Collaborate Channel and Spatial Attention from Multi-Information Fusion. IET Computer Vision 2023.

Methods

forward(x)[source]#

Apply the CATLite block to the input tensor.

Parameters:

x (Pytorch.Tensor)

Return type:

Pytorch.Tensor