Summary
EEGTCNet currently exposes a single drop_prob and passes it to both the EEGNet front-end and the TCN block. The paper/source model uses separate dropout rates for these two parts.
This prevents reproducing the source/paper configuration where:
- EEGNet dropout
p_e = 0.2
- TCN dropout
p_t = 0.3
Where to patch
braindecode/models/eegtcnet.py, in EEGTCNet.__init__.
Current behavior:
self.eegnet_tc = _EEGNetTC(..., drop_prob=self.drop_prob, ...)
self.tcn_block = _TCNBlock(..., drop_prob=self.drop_prob, ...)
Suggested API-compatible direction:
drop_prob: float | None = 0.5,
drop_prob_eeg: float | None = None,
drop_prob_tcn: float | None = None,
Then resolve:
if drop_prob_eeg is None:
drop_prob_eeg = drop_prob
if drop_prob_tcn is None:
drop_prob_tcn = drop_prob
and pass:
self.eegnet_tc = _EEGNetTC(..., drop_prob=drop_prob_eeg, ...)
self.tcn_block = _TCNBlock(..., drop_prob=drop_prob_tcn, ...)
This keeps the existing single-parameter behavior while allowing source-faithful reproduction.
Evidence
The official EEG-TCNet source separates these parameters:
def EEGTCNet(..., dropout=0, ..., dropout_eeg=0.1):
EEGNet_sep = EEGNet(..., dropout=dropout_eeg)
outs = TCN_block(..., dropout=dropout, ...)
The EEG-TCNet paper/source configuration reports separate fixed values (p_e=0.2, p_t=0.3) for BCI Competition IV 2a.
Suggested regression test
Instantiate:
model = EEGTCNet(
n_chans=22,
n_times=1125,
n_outputs=4,
drop_prob_eeg=0.2,
drop_prob_tcn=0.3,
)
Then assert:
model.eegnet_tc.drop1.p == 0.2
model.eegnet_tc.drop2.p == 0.2
model.tcn_block.layers[0][3].p == 0.3
model.tcn_block.layers[0][7].p == 0.3
Summary
EEGTCNetcurrently exposes a singledrop_proband passes it to both the EEGNet front-end and the TCN block. The paper/source model uses separate dropout rates for these two parts.This prevents reproducing the source/paper configuration where:
p_e = 0.2p_t = 0.3Where to patch
braindecode/models/eegtcnet.py, inEEGTCNet.__init__.Current behavior:
Suggested API-compatible direction:
Then resolve:
and pass:
This keeps the existing single-parameter behavior while allowing source-faithful reproduction.
Evidence
The official EEG-TCNet source separates these parameters:
The EEG-TCNet paper/source configuration reports separate fixed values (
p_e=0.2,p_t=0.3) for BCI Competition IV 2a.Suggested regression test
Instantiate:
Then assert: