metabci.brainda.algorithms.deep_learning.eegnet module

EEGNet. Modified from https://github.com/vlawhern/arl-eegmodels/blob/master/EEGModels.py

class metabci.brainda.algorithms.deep_learning.eegnet.SeparableConv2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, bias=True, padding_mode='zeros', D=1)[source]

Bases: Module

An equally SeparableConv2d in Keras. A depthwise conv followed by a pointwise conv.

forward(X)[source]

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

training: bool