Views
No views yet
Architecture-only repository. Documents thebraindecode.models.AttnSleepclass. No pretrained weights are distributed here. Instantiate the model and train it on your own data.
pip install braindecode1from braindecode.models import AttnSleep
2
3model = AttnSleep(
4 n_chans=2,
5 sfreq=100,
6 input_window_seconds=30.0,
7 n_outputs=5,
8)
| Parameter | Type | Description |
|---|---|---|
n_tce | int | Number of TCE clones. |
d_model | int | Input dimension for the TCE. Also the input dimension of the first FC layer in the feed forward and the output of the second FC layer in the same. Increase for higher sampling rate/signal length. It should be divisible by n_attn_heads |
d_ff | int | Output dimension of the first FC layer in the feed forward and the input dimension of the second FC layer in the same. |
n_attn_heads | int | Number of attention heads. It should be a factor of d_model |
drop_prob | float | Dropout rate in the PositionWiseFeedforward layer and the TCE layers. |
after_reduced_cnn_size | int | Number of output channels produced by the convolution in the AFR module. |
return_feats | bool | If True, return the features, i.e. the output of the feature extractor (before the final linear layer). If False, pass the features through the final linear layer. |
n_classes | int | Alias for n_outputs. |
input_size_s | float | Alias for input_window_seconds. |
activation | nn.Module, default=nn.ReLU | Activation function class to apply. Should be a PyTorch activation module class like nn.ReLU or nn.ELU. Default is nn.ReLU. |
activation_mrcnn | nn.Module, default=nn.ReLU | Activation function class to apply in the Mask R-CNN layer. Should be a PyTorch activation module class like nn.ReLU or nn.GELU. Default is nn.GELU. |
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}