braindecode.models.EEGResNet#

class braindecode.models.EEGResNet(n_chans=None, n_outputs=None, n_times=None, final_pool_length=None, n_first_filters=None, n_layers_per_block=2, first_filter_length=3, nonlinearity=<function elu>, split_first_layer=True, batch_norm_alpha=0.1, batch_norm_epsilon=0.0001, conv_weight_init_fn=<function EEGResNet.<lambda>>, chs_info=None, input_window_seconds=None, sfreq=None, in_chans=None, n_classes=None, input_window_samples=None, add_log_softmax=True)[source]#

Residual Network for EEG.

XXX missing reference

Parameters:
  • n_chans (int) – Number of EEG channels.

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

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

  • final_pool_length – The description is missing.

  • n_first_filters – The description is missing.

  • n_layers_per_block – The description is missing.

  • first_filter_length – The description is missing.

  • nonlinearity – The description is missing.

  • split_first_layer – The description is missing.

  • batch_norm_alpha – The description is missing.

  • batch_norm_epsilon – The description is missing.

  • conv_weight_init_fn – The description is missing.

  • 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.

  • in_chans

    Alias for n_chans. n_classes :

    Alias for n_outputs.

    input_window_samples :

    Alias for n_times.

  • n_classes – The description is missing.

  • input_window_samples – The description is missing.

  • add_log_softmax (bool) – Whether to use log-softmax non-linearity as the output function. LogSoftmax final layer will be removed in the future. Please adjust your loss function accordingly (e.g. CrossEntropyLoss)! Check the documentation of the torch.nn loss functions: https://pytorch.org/docs/stable/nn.html#loss-functions.

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

If some input signal-related parameters are not specified, there will be an attempt to infer them from the other parameters.