braindecode.modules.GatherExcite#
- class braindecode.modules.GatherExcite(in_channels, seq_len=62, extra_params=False, use_mlp=False, reduction_rate=4)[source]#
Gather-Excite Networks from [Hu2018b].
- Parameters:
in_channels (
int) – number of input feature channelsseq_len (
int) – sequence length along temporal dimensionextra_params (
bool) – whether to use a convolutional layer as a gather moduleuse_mlp (
bool) – whether to use an excite block with fully-connected layersreduction_rate (
int) – reduction ratio of the excite block (if used)
Examples
>>> import torch >>> from braindecode.modules import GatherExcite >>> module = GatherExcite(in_channels=16, seq_len=64, extra_params=False, use_mlp=True) >>> inputs = torch.randn(2, 16, 1, 64) >>> outputs = module(inputs) >>> outputs.shape torch.Size([2, 16, 1, 64])
References
[Hu2018b]Hu, J., Albanie, S., Sun, G., Vedaldi, A., 2018. Gather-Excite: Exploiting Feature Context in Convolutional Neural Networks. NeurIPS 2018.
Methods