neuraltrain.models.fmri_mlp.FmriMlp¶
- pydantic model neuraltrain.models.fmri_mlp.FmriMlp[source][source]¶
Residual MLP for fMRI decoding, adapted from MindEye [1].
- Parameters:
hidden (int) – Hidden dimension of the residual MLP blocks.
n_blocks (int) – Number of residual MLP blocks.
norm_type ({"ln", "bn"}) – Normalization layer type:
"ln"for LayerNorm,"bn"for BatchNorm.act_first (bool) – If True, apply activation before normalization in each block.
n_repetition_times (int) – Number of fMRI repetition times (TRs) expected in the input.
time_agg ({"in_mean", "in_linear", "out_mean", "out_linear"}) – Temporal aggregation strategy.
"in_*"aggregates before the MLP;"out_*"aggregates after.use_tr_embeds (bool) – Add learned per-TR embeddings to the input features.
tr_embed_dim (int) – Dimensionality of each TR embedding.
use_tr_layer (bool) – Use a grouped 1-D convolution (one group per TR) as the first projection instead of a shared
nn.Linear.out_dim (int or None) – Explicit output dimension. Overridden by n_outputs at build time.
subject_layers_config (SubjectLayers or None) – If set, prepend a per-subject linear projection.
subject_layers_dim ({"input", "hidden"}) – Dimension used for the subject-layer projection.
output_head_config (Mlp, dict[str, Mlp], or None) – Optional output head(s) appended after the MLP backbone.
References
- Fields:
- field subject_layers_config: SubjectLayers | None = None[source]¶