neuraltrain.models.labram.NtLabram

pydantic model neuraltrain.models.labram.NtLabram[source][source]

Config for the braindecode LaBraM model with pretrained-model support.

Extends BaseBrainDecodeModel with LaBraM-specific logic:

  1. Channel remapping – an explicit channel_mapping dict maps dataset channel names to LaBraM channel names. Channels whose names already match LABRAM_CHANNEL_ORDER (case-insensitively) need no entry.

  2. Dynamic channel resolution – the model is wrapped in _LabramChannelWrapper so that valid channels are detected from channel_positions at each forward call, then remapped and passed to the inner braindecode model via ch_names.

Parameters:

channel_mapping (dict or None) – Explicit mapping from dataset channel names to LaBraM channel names. Useful for EEG systems with known correspondences (e.g. Geodesic E-number to 10-10).

Fields:
chs_info_required: ClassVar[bool] = True[source]
needs_n_times: ClassVar[bool] = True[source]
field channel_mapping: dict[str, str] | None = None[source]
build(n_chans: int | None = None, n_times: int | None = None, n_outputs: int | None = None, chs_info: list[dict[str, Any]] | None = None, **kwargs: Any) Module[source][source]