Linear modules #
The mathematical forward map comes from Spec.linearSpec. This file packages it as a
shape-indexed Spec.Module for composition and source export.
def
Spec.Module.linear
{α : Type}
[TorchLean.Storage α]
[Add α]
[Mul α]
[Zero α]
{inDim outDim : ℕ}
(m : LinearSpec α inDim outDim)
:
A linear layer as a mathematical module.