File size: 3,344 Bytes
2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f fb000be 2fe248f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | ---
license: bsd-3-clause
library_name: braindecode
pipeline_tag: feature-extraction
tags:
- eeg
- biosignal
- pytorch
- neuroscience
- braindecode
- convolutional
---
# SincShallowNet
Sinc-ShallowNet from Borra, D et al (2020) [borra2020].
> **Architecture-only repository.** Documents the
> `braindecode.models.SincShallowNet` class. **No pretrained weights are
> distributed here.** Instantiate the model and train it on your own
> data.
## Quick start
```bash
pip install braindecode
```
```python
from braindecode.models import SincShallowNet
model = SincShallowNet(
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
- Full API reference: <https://braindecode.org/stable/generated/braindecode.models.SincShallowNet.html>
- Interactive browser (live instantiation, parameter counts):
<https://huggingface.co/spaces/braindecode/model-explorer>
- Source on GitHub: <https://github.com/braindecode/braindecode/blob/master/braindecode/models/sinc_shallow.py#L11>
## Architecture

## Parameters
| Parameter | Type | Description |
|---|---|---|
| `num_time_filters` | int | Number of temporal filters in the SincFilter layer. |
| `time_filter_len` | int | Size of the temporal filters. |
| `depth_multiplier` | int | Depth multiplier for spatial filtering. |
| `activation` | nn.Module, optional | Activation function to use. Default is nn.ELU(). |
| `drop_prob` | float, optional | Dropout probability. Default is 0.5. |
| `first_freq` | float, optional | The starting frequency for the first Sinc filter. Default is 5.0. |
| `min_freq` | float, optional | Minimum frequency allowed for the low frequencies of the filters. Default is 1.0. |
| `freq_stride` | float, optional | Frequency stride for the Sinc filters. Controls the spacing between the filter frequencies. Default is 1.0. |
| `padding` | str, optional | Padding mode for convolution, either 'same' or 'valid'. Default is 'same'. |
| `bandwidth` | float, optional | Initial bandwidth for each Sinc filter. Default is 4.0. |
| `pool_size` | int, optional | Size of the pooling window for the average pooling layer. Default is 55. |
| `pool_stride` | int, optional | Stride of the pooling operation. Default is 12. |
## References
1. Borra, D., Fantozzi, S., & Magosso, E. (2020). Interpretable and lightweight convolutional neural network for EEG decoding: Application to movement execution and imagination. Neural Networks, 129, 55-74.
2. Sinc-ShallowNet re-implementation source code: https://github.com/marcellosicbaldi/SincNet-Tensorflow
## Citation
Cite the original architecture paper (see *References* above) and braindecode:
```bibtex
@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.
|