neuraltrain.models.linear.Linear

pydantic model neuraltrain.models.linear.Linear[source][source]

Simple linear projection, with optional per-subject weights.

Parameters:
  • reduction ({"mean", "concat"}) – How to reduce the time dimension before the linear layer. "mean" averages over time; "concat" flattens channels and time.

  • subject_layers_config (SubjectLayers or None) – If set, use a SubjectLayersModel instead of a shared nn.Linear.

Fields:
field reduction: Literal['mean', 'concat'] = 'mean'[source]
field subject_layers_config: SubjectLayers | None = None[source]
build(n_in_channels: int, n_outputs: int) Module[source][source]