MLP Model Helpers (API) #
Compact, reusable MLP-shaped model constructors for TorchLean examples.
These live in the API layer so runnable examples can stay focused on:
data loading, training loops, and CLI flags, rather than repeating the same
linear → activation → linear boilerplate.
Scope note: these are building blocks, not pretrained checkpoints.
def
NN.API.nn.models.mlp1Relu
(cfg : Mlp1Config)
:
M (Sequential (mlp1InShape cfg) (mlp1OutShape cfg))
Build a single-hidden-layer MLP with ReLU activation:
linear(inDim → hidDim) → relu → linear(hidDim → outDim).