Views
No views yet
Architecture-only repository. Documents thebraindecode.models.CBraModclass. No pretrained weights are distributed here. Instantiate the model and train it on your own data.
pip install braindecode1from braindecode.models import CBraMod
2
3model = CBraMod(
4 n_chans=22,
5 sfreq=200,
6 input_window_seconds=4.0,
7 n_outputs=2,
8)
| Parameter | Type | Description |
|---|---|---|
patch_size | int, default=200 | Temporal patch size in samples (200 samples = 1 second at 200 Hz). |
dim_feedforward | int, default=800 | Dimension of the feedforward network in Transformer layers. |
n_layer | int, default=12 | Number of Transformer layers. |
nhead | int, default=8 | Number of attention heads. |
activation | type[nn.Module], default=nn.GELU | Activation function used in Transformer feedforward layers. |
emb_dim | int, default=200 | Output embedding dimension. |
drop_prob | float, default=0.1 | Dropout probability. |
return_encoder_output | bool, default=False | If false (default), the features are flattened and passed through a final linear layer to produce class logits of size n_outputs. If True, the model returns the encoder output features. |
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}