Linear regression as an NNModuleSpec #
The spec model file (NN/Spec/Models/LinearRegression.lean) defines the math: forward and
backward/VJP pieces.
This file provides the small NNModuleSpec wrapper so linear regression can be composed via
SpecChain and recognized by export tooling (PyTorch string renderings, dimension metadata, etc.).
def
Spec.LinearRegressionModuleSpec
{α : Type}
[Context α]
{inDim : ℕ}
(model : LinearRegressionSpec α inDim)
:
Package a fixed-parameter linear regression as a NNModuleSpec.
PyTorch analogy: nn.Linear(inDim, 1).