neuraltrain.models.labram.NtLabram

class neuraltrain.models.labram.NtLabram(*, kwargs: dict[str, Any] = {}, from_pretrained_name: str | None = None, channel_mapping: dict[str, str] | None = None)[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).