braindecode.models.TCN¶
- class braindecode.models.TCN(n_in_chans, n_outputs, n_blocks, n_filters, kernel_size, drop_prob, add_log_softmax)¶
Temporal Convolutional Network (TCN) from Bai et al 2018.
See [Bai2018] for details.
Code adapted from https://github.com/locuslab/TCN/blob/master/TCN/tcn.py
- Parameters
- n_in_chans: int
number of input EEG channels
- n_outputs: int
number of outputs of the decoding task (for example number of classes in classification)
- n_filters: int
number of output filters of each convolution
- n_blocks: int
number of temporal blocks in the network
- kernel_size: int
kernel size of the convolutions
- drop_prob: float
dropout probability
- add_log_softmax: bool
whether to add a log softmax layer
References
- Bai2018
Bai, S., Kolter, J. Z., & Koltun, V. (2018). An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv preprint arXiv:1803.01271.
Methods
- forward(x)¶
Forward pass.
- Parameters
- x: torch.Tensor
Batch of EEG windows of shape (batch_size, n_channels, n_times).