neuraltrain.models.luna.NtLuna¶
- class neuraltrain.models.luna.NtLuna(*, kwargs: dict[str, Any] = {}, from_pretrained_name: str | None = None, pretrained_filename: str | None = None)[source][source]¶
Config for the braindecode LUNA model.
Extends
BaseBrainDecodeModelwith LUNA-specific logic:Keyword mapping — wraps the model so its forward accepts
channel_positionsand maps it to LUNA’schannel_locations.Time padding — zero-pads the time dimension to a multiple of
patch_size.Encoder-only output — when
n_outputsis not passed (i.e. when aDownstreamWrapperModelhandles the classification head), the classification head is replaced withnn.Identity()so the model returns the encoder latent.
- Parameters:
pretrained_filename (str or None) – When
from_pretrained_namepoints to a Hub repository containing multiple weight files (e.g.PulpBio/LUNA), this selects which file to download. Requires braindecode >= 1.5 which natively supports thefilenamekwarg infrom_pretrained.