braindecode.models.BDTCN#

class braindecode.models.BDTCN(n_chans=None, n_outputs=None, chs_info=None, n_times=None, sfreq=None, input_window_seconds=None, n_blocks=3, n_filters=30, kernel_size=5, drop_prob=0.5, activation=<class 'torch.nn.modules.activation.ReLU'>)[source]#

Braindecode TCN from Gemein, L et al (2020) [gemein2020].

Convolution Recurrent

Braindecode TCN Architecture

See [gemein2020] for details.

Parameters:
  • n_filters (int) – number of output filters of each convolution

  • n_blocks (int) – number of temporal blocks in the network

  • kernel_size (int) – kernel size of the convolutions

  • drop_prob (float) – dropout probability

  • activation (nn.Module, default=nn.ReLU) – Activation function class to apply. Should be a PyTorch activation module class like nn.ReLU or nn.ELU. Default is nn.ReLU.

References

[gemein2020] (1,2)

Gemein, L. A., Schirrmeister, R. T., Chrabąszcz, P., Wilson, D., Boedecker, J., Schulze-Bonhage, A., … & Ball, T. (2020). Machine-learning-based diagnostics of EEG pathology. NeuroImage, 220, 117021.

Methods

forward(x)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.