braindecode.models.EEGITNet#

class braindecode.models.EEGITNet(n_outputs=None, n_chans=None, n_times=None, chs_info=None, input_window_seconds=None, sfreq=None, n_filters_time: int = 2, kernel_length: int = 16, pool_kernel: int = 4, tcn_in_channel: int = 14, tcn_kernel_size: int = 4, tcn_padding: int = 3, drop_prob: float = 0.4, tcn_dilatation: int = 1, activation: ~torch.nn.modules.module.Module = <class 'torch.nn.modules.activation.ELU'>)[source]#

EEG-ITNet from Salami, et al (2022) [Salami2022]

EEG-ITNet Architecture

EEG-ITNet: An Explainable Inception Temporal Convolutional Network for motor imagery classification from Salami et al. 2022.

See [Salami2022] for details.

Code adapted from abbassalami/eeg-itnet

Parameters:
  • n_outputs (int) – Number of outputs of the model. This is the number of classes in the case of classification.

  • n_chans (int) – Number of EEG channels.

  • n_times (int) – Number of time samples of the input window.

  • chs_info (list of dict) – Information about each individual EEG channel. This should be filled with info["chs"]. Refer to mne.Info for more details.

  • input_window_seconds (float) – Length of the input window in seconds.

  • sfreq (float) – Sampling frequency of the EEG recordings.

  • n_filters_time – The description is missing.

  • kernel_length (int, optional) – Kernel length for inception branches. Determines the temporal receptive field. Default is 16.

  • pool_kernel (int, optional) – Pooling kernel size for the average pooling layer. Default is 4.

  • tcn_in_channel (int, optional) – Number of input channels for Temporal Convolutional (TC) blocks. Default is 14.

  • tcn_kernel_size (int, optional) – Kernel size for the TC blocks. Determines the temporal receptive field. Default is 4.

  • tcn_padding (int, optional) – Padding size for the TC blocks to maintain the input dimensions. Default is 3.

  • drop_prob (float, optional) – Dropout probability applied after certain layers to prevent overfitting. Default is 0.4.

  • tcn_dilatation (int, optional) – Dilation rate for the first TC block. Subsequent blocks will have dilation rates multiplied by powers of 2. Default is 1.

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

Raises:
  • ValueError – If some input signal-related parameters are not specified: and can not be inferred.

  • FutureWarning – If add_log_softmax is True, since LogSoftmax final layer: will be removed in the future.

Notes

This implementation is not guaranteed to be correct, has not been checked by original authors, only reimplemented from the paper based on author implementation.

References

[Salami2022] (1,2)

A. Salami, J. Andreu-Perez and H. Gillmeister, “EEG-ITNet: An Explainable Inception Temporal Convolutional Network for motor imagery classification,” in IEEE Access, doi: 10.1109/ACCESS.2022.3161489.