neuraltrain.models.luna.NtLuna

pydantic model neuraltrain.models.luna.NtLuna[source][source]

Config for the braindecode LUNA model.

Extends BaseBrainDecodeModel with LUNA-specific logic:

  1. Keyword mapping — wraps the model so its forward accepts channel_positions and maps it to LUNA’s channel_locations.

  2. Time padding — zero-pads the time dimension to a multiple of patch_size.

  3. Encoder-only output — when n_outputs is not passed (i.e. when a DownstreamWrapperModel handles the classification head), the classification head is replaced with nn.Identity() so the model returns the encoder latent.

Parameters:

pretrained_filename (str or None) – When from_pretrained_name points 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 the filename kwarg in from_pretrained.

Fields:
field pretrained_filename: str | None = None[source]
build(n_chans: int | None = None, n_times: int | None = None, n_outputs: int | None = None, **kwargs: Any) Module[source][source]