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
BaseBrainDecodeModelwith LaBraM-specific logic:Channel remapping – an explicit
channel_mappingdict maps dataset channel names to LaBraM channel names. Channels whose names already matchLABRAM_CHANNEL_ORDER(case-insensitively) need no entry.Dynamic channel resolution – the model is wrapped in
_LabramChannelWrapperso that valid channels are detected fromchannel_positionsat each forward call, then remapped and passed to the inner braindecode model viach_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).