Deep4Net

Deep ConvNet model from Schirrmeister et al (2017) [Schirrmeister2017].

Architecture-only repository. Documents the braindecode.models.Deep4Net class. No pretrained weights are distributed here. Instantiate the model and train it on your own data.

Quick start

pip install braindecode
from braindecode.models import Deep4Net

model = Deep4Net(
    n_chans=22,
    sfreq=250,
    input_window_seconds=4.0,
    n_outputs=4,
)

The signal-shape arguments above are illustrative defaults β€” adjust to match your recording.

Documentation

Architecture

Deep4Net architecture

Parameters

Parameter Type Description
`final_conv_length: int str` β€”
n_filters_time: int β€” Number of temporal filters.
n_filters_spat: int β€” Number of spatial filters.
filter_time_length: int β€” Length of the temporal filter in layer 1.
pool_time_length: int β€” Length of temporal pooling filter.
pool_time_stride: int β€” Length of stride between temporal pooling filters.
n_filters_2: int β€” Number of temporal filters in layer 2.
filter_length_2: int β€” Length of the temporal filter in layer 2.
n_filters_3: int β€” Number of temporal filters in layer 3.
filter_length_3: int β€” Length of the temporal filter in layer 3.
n_filters_4: int β€” Number of temporal filters in layer 4.
filter_length_4: int β€” Length of the temporal filter in layer 4.
activation_first_conv_nonlin: nn.Module, default is nn.ELU β€” Non-linear activation function to be used after convolution in layer 1.
first_pool_mode: str β€” Pooling mode in layer 1. "max" or "mean".
first_pool_nonlin: callable β€” Non-linear activation function to be used after pooling in layer 1.
activation_later_conv_nonlin: nn.Module, default is nn.ELU β€” Non-linear activation function to be used after convolution in later layers.
later_pool_mode: str β€” Pooling mode in later layers. "max" or "mean".
later_pool_nonlin: callable β€” Non-linear activation function to be used after pooling in later layers.
drop_prob: float β€” Dropout probability.
split_first_layer: bool β€” Split first layer into temporal and spatial layers (True) or just use temporal (False). There would be no non-linearity between the split layers.
batch_norm: bool β€” Whether to use batch normalisation.
batch_norm_alpha: float β€” Momentum for BatchNorm2d.
stride_before_pool: bool β€” Stride before pooling.

References

  1. Schirrmeister, R. T., Springenberg, J. T., Fiederer, L. D. J., Glasstetter, M., Eggensperger, K., Tangermann, M., Hutter, F. & Ball, T. (2017). Deep learning with convolutional neural networks for EEG decoding and visualization. Human Brain Mapping , Aug. 2017. Online: http://dx.doi.org/10.1002/hbm.23730

Citation

Cite the original architecture paper (see References above) and braindecode:

@article{aristimunha2025braindecode,
  title   = {Braindecode: a deep learning library for raw electrophysiological data},
  author  = {Aristimunha, Bruno and others},
  journal = {Zenodo},
  year    = {2025},
  doi     = {10.5281/zenodo.17699192},
}

License

BSD-3-Clause for the model code (matching braindecode). Pretraining-derived weights, if you fine-tune from a checkpoint, inherit the licence of that checkpoint and its training corpus.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support