Models and training
Use this route when a task asks for a Braindecode model, model registry lookup,
EEGClassifier, EEGRegressor, cropped decoding, fine-tuning, evaluation,
regression, or local pretrained weights.
Workflow
- Start with a validated dataset/window contract: channels, samples,
sfreq,
dtype, target type, and output count. Run a model forward before training.
- Choose a representative model family from the overview, then pass explicit
n_chans/n_times/n_outputs/sfreq or let the skorch wrapper infer signal
parameters from a compatible dataset. Use final_conv_length="auto" only
when the model supports it and verify the resulting shape.
- Configure
EEGClassifier or EEGRegressor with an optimizer, criterion,
split, batch size, callbacks, and explicit device. module may be a class,
name from the registry, or initialized module depending on the route; verify
the wrapper's accepted form.
- Distinguish trialwise output from dense/cropped output. Use
CroppedLoss and
compatible aggregation only for window/crop workflows; inspect predictions
and targets before reporting a metric.
- For pretrained models, validate checkpoint keys and tensor shapes locally,
keep the classification head distinction explicit, and never download or
upload a checkpoint without authorization.
Read model overview, API reference,
training workflows, pretrained models,
and troubleshooting. Run the bounded local
training smoke before an expensive experiment.
1---2name: models-and-training3description: "Guides braindecode model selection, signal-parameter4 initialization, skorch classifier or regressor training, cropped decoding,5 prediction, and local checkpoint use."6disable-model-invocation: true7metadata:8 source: https://skillmd.com/skills/vectorspacelab/models-and-training9 disco-role: operating10license: BSD 3-Clause11---1213# Models and training1415Use this route when a task asks for a Braindecode model, model registry lookup,16`EEGClassifier`, `EEGRegressor`, cropped decoding, fine-tuning, evaluation,17regression, or local pretrained weights.1819## Workflow20211. Start with a validated dataset/window contract: channels, samples, `sfreq`,22 dtype, target type, and output count. Run a model forward before training.232. Choose a representative model family from the overview, then pass explicit24 `n_chans`/`n_times`/`n_outputs`/`sfreq` or let the skorch wrapper infer signal25 parameters from a compatible dataset. Use `final_conv_length="auto"` only26 when the model supports it and verify the resulting shape.273. Configure `EEGClassifier` or `EEGRegressor` with an optimizer, criterion,28 split, batch size, callbacks, and explicit `device`. `module` may be a class,29 name from the registry, or initialized module depending on the route; verify30 the wrapper's accepted form.314. Distinguish trialwise output from dense/cropped output. Use `CroppedLoss` and32 compatible aggregation only for window/crop workflows; inspect predictions33 and targets before reporting a metric.345. For pretrained models, validate checkpoint keys and tensor shapes locally,35 keep the classification head distinction explicit, and never download or36 upload a checkpoint without authorization.3738Read [model overview](references/model-overview.md), [API reference](references/api-reference.md),39[training workflows](references/training-workflows.md), [pretrained models](references/pretrained-models.md),40and [troubleshooting](references/troubleshooting.md). Run the bounded local41[training smoke](scripts/smoke_train.py) before an expensive experiment.