TorchLean API

NN.GraphSpec.Models

GraphSpec Model Catalog #

Curated architecture import for GraphSpec users.

This file is the place a user should import when they are thinking “models as architectures.” It re-exports the pure model specifications from NN.Spec.Models and the graph-native examples in this directory.

We still keep the source files split by semantic layer:

That split avoids circular dependencies and keeps proofs honest, while this umbrella gives users a single architecture-facing import that includes both the broad spec catalog and the graph-authored coverage ladder.

The current set is intentionally a coverage ladder, not an exhaustive catalog:

  1. mlp: smallest sequential typed parameter ABI.
  2. cnn2: sequential vision pipeline with convolution/pooling shape arithmetic.
  3. residualLinear: minimal DAG model with a real skip connection.
  4. ResNet18.model: larger DAG model with repeated residual blocks and projection shortcuts.

The examples intentionally mix two authoring styles, but they have one conceptual endpoint: DAG.Model.

NN.GraphSpec.Models is the single import for these GraphSpec-specific examples, regardless of which GraphSpec surface syntax they were authored in.

Included examples:

See also:

If you are new to this directory, a good order is:

  1. Models.mlp,
  2. Models.cnn2,
  3. Models.residualLinear as the minimal DAG/skip-connection example,
  4. Models.ResNet18.model as the larger residual architecture.