Views
No views yet
Architecture-only repository. Documents thebraindecode.models.MetaNeuromotorHandclass. No pretrained weights are distributed here. Instantiate the model and train it on your own data.
pip install braindecode1from braindecode.models import MetaNeuromotorHand
2
3model = MetaNeuromotorHand(
4 n_chans=22,
5 sfreq=250,
6 input_window_seconds=4.0,
7 n_outputs=4,
8)
| Parameter | Type | Description |
|---|---|---|
n_outputs | int | Vocabulary size for CTC. Defaults to 100 (handwriting charset). |
n_chans | int | Number of EMG channels. Defaults to 16 (one armband). |
sfreq | float | Sampling frequency in Hz. Defaults to 2000. |
mpf_window_length | int | MPF window length in samples. |
mpf_stride | int | MPF frame stride in samples. |
mpf_n_fft | int | STFT window / FFT size. |
mpf_fft_stride | int | STFT hop size. Must divide mpf_stride and be <= mpf_n_fft. |
mpf_frequency_bins | sequence of (float, float) or None | (low, high) Hz bands to average the cross-spectrum over. If None, all FFT frequency bins are used. |
mask_max_num_masks | sequence of int | Max number of SpecAugment masks per dim (order matches mask_dims). |
mask_max_lengths | sequence of int | Max mask length per dim (order matches mask_dims). |
mask_dims | str | Axes to mask, among "CFT". Defaults to "TF". |
mask_value | float | Filler value for masked regions. |
invariance_hidden_dims | sequence of int | Hidden layer sizes of the per-rotation MLP. Output feature dim is invariance_hidden_dims[-1]. |
invariance_offsets | sequence of int | Circular channel rotations to average over. |
num_adjacent_cov | int | Number of adjacent off-diagonals of the cross-channel covariance matrix to keep. |
conformer_input_dim | int | Conformer embedding dimension D. |
conformer_ffn_dim | int | Feed-forward hidden dim inside each block. |
conformer_kernel_size | int or sequence of int | Depthwise-conv kernel size per block. |
conformer_stride | int or sequence of int | Depthwise-conv stride per block. As a scalar, applied only to the last block (entire encoder downsamples by stride); as a sequence of length conformer_num_layers, applied per block. Defaults to the paper's 15-layer schedule (1, 1, 1, 1, 2) * 2 + (1,) * 5 (2x downsampling at blocks 5 and 10). When overriding conformer_num_layers, also pass a matching schedule or a scalar. |
conformer_num_heads | int | Number of attention heads. |
conformer_attn_window_size | int or sequence of int | Attention receptive field per block. Defaults to the paper's 15-layer schedule (16,) * 10 + (8,) * 5. When overriding conformer_num_layers, also pass a matching schedule or a scalar. |
conformer_num_layers | int | Number of conformer blocks. |
drop_prob | float | Dropout probability applied throughout the conformer (FFN, conv and attention blocks). |
time_reduction_stride | int | Frame-stacking stride applied before the conformer. 1 disables it. |
log_softmax | bool | If True, apply :func:torch.nn.functional.log_softmax to the emissions. Disabled by default (braindecode models return logits). |
activation | type of nn.Module | Activation class used inside the conformer feed-forward and convolution blocks. Defaults to :class:torch.nn.SiLU. |
invariance_activation | type of nn.Module | Activation class used inside the rotation-invariant MLP. Defaults to :class:torch.nn.LeakyReLU. |
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}