GraphSpec Model Catalog #
Import for the graph-authored example models in NN.GraphSpec.Models.*. Their structure is
itself a typed Chain or DAG.Model, so the same architecture can be lowered to TorchLean and
its graph shape reasoned about. Pure reference specifications (Transformer, ViT, Mamba, S4, UNet,
VAE/VQ-VAE/GAN, classical baselines) live in NN.Spec.Models and are not imported here; runnable
scripts live in NN.Examples.Models.
The set is a coverage ladder, not a catalog:
mlp: the smallest sequentialChainwith a typed parameter ABI.classifier: a caller-supplied feature chain followed by flattening and a linear classifier.residualLinear: a minimalDAG.Modelwith a real skip connection.
The first two are sequential chains and the third is DAG-native. To turn a chain into a
zero-initialized DAG.Model, import NN.GraphSpec.Chain.ToDAG.Model and use
LowerToDAG.Chain.toDAGModelZeroInit.
See also:
NN/GraphSpec/README.mdfor the overall layout and motivation.NN.GraphSpec.Chain.Loweringfor the sequential DSL and lowering helpers.NN.GraphSpec.DAGfor the DAG term language and its primitives.