Views
No views yet
Architecture-only repository. Documents thebraindecode.models.EEGNetclass. No pretrained weights are distributed here. Instantiate the model and train it on your own data.
pip install braindecode1from braindecode.models import EEGNet
2
3model = EEGNet(
4 n_chans=22,
5 sfreq=250,
6 input_window_seconds=4.0,
7 n_outputs=4,
8)
| Parameter | Type | Description |
|---|---|---|
final_conv_length | int or "auto", default="auto" | Length of the final convolution layer. If "auto", it is set based on n_times. |
pool_mode | {"mean", "max"}, default="mean" | Pooling method to use in pooling layers. |
F1 | int, default=8 | Number of temporal filters in the first convolutional layer. |
D | int, default=2 | Depth multiplier for the depthwise convolution. |
F2 | int or None, default=None | Number of pointwise filters in the separable convolution. Usually set to F1 * D. |
depthwise_kernel_length | int, default=16 | Length of the depthwise convolution kernel in the separable convolution. |
pool1_kernel_size | int, default=4 | Kernel size of the first pooling layer. |
pool2_kernel_size | int, default=8 | Kernel size of the second pooling layer. |
kernel_length | int, default=64 | Length of the temporal convolution kernel. |
conv_spatial_max_norm | float, default=1 | Maximum norm constraint for the spatial (depthwise) convolution. |
activation | nn.Module, default=nn.ELU | Non-linear activation function to be used in the layers. |
batch_norm_momentum | float, default=0.01 | Momentum for instance normalization in batch norm layers. |
batch_norm_affine | bool, default=True | If True, batch norm has learnable affine parameters. |
batch_norm_eps | float, default=1e-3 | Epsilon for numeric stability in batch norm layers. |
drop_prob | float, default=0.25 | Dropout probability. |
final_layer_with_constraint | bool, default=False | If False, uses a convolution-based classification layer. If True, apply a flattened linear layer with constraint on the weights norm as the final classification step. |
norm_rate | float, default=0.25 | Max-norm constraint value for the linear layer (used if final_layer_conv=False). |
1@article{aristimunha2025braindecode,
2 title = {Braindecode: a deep learning library for raw electrophysiological data},
3 author = {Aristimunha, Bruno and others},
4 journal = {Zenodo},
5 year = {2025},
6 doi = {10.5281/zenodo.17699192},
7}