braindecode.models.TIDNet¶
- class braindecode.models.TIDNet(in_chans, n_classes, input_window_samples, s_growth=24, t_filters=32, drop_prob=0.4, pooling=15, temp_layers=2, spat_layers=2, temp_span=0.05, bottleneck=3, summary=- 1)¶
Thinker Invariance DenseNet model from Kostas et al 2020.
See [TIDNet] for details.
- Parameters
- n_classesint
Number of classes.
- in_chansint
Number of EEG channels.
- input_window_samplesint
Number of samples.
- s_growthint
DenseNet-style growth factor (added filters per DenseFilter)
- t_filtersint
Number of temporal filters.
- drop_probfloat
Dropout probability
- poolingint
Max temporal pooling (width and stride)
- temp_layersint
Number of temporal layers
- spat_layersint
Number of DenseFilters
- temp_spanfloat
Percentage of input_window_samples that defines the temporal filter length: temp_len = ceil(temp_span * input_window_samples) e.g A value of 0.05 for temp_span with 1500 input_window_samples will yield a temporal filter of length 75.
- bottleneckint
Bottleneck factor within Densefilter
- summaryint
Output size of AdaptiveAvgPool1D layer. If set to -1, value will be calculated automatically (input_window_samples // pooling).
Notes
Code adapted from: https://github.com/SPOClab-ca/ThinkerInvariance/
References
- TIDNet
Kostas, D. & Rudzicz, F. Thinker invariance: enabling deep neural networks for BCI across more people. J. Neural Eng. 17, 056008 (2020). doi: 10.1088/1741-2552/abb7a7.
Methods
- forward(x)¶
Forward pass.
- Parameters
- x: torch.Tensor
Batch of EEG windows of shape (batch_size, n_channels, n_times).