TorchLean API

NN.GraphSpec.DAG

Typed Computation DAGs #

This is the public entry point for GraphSpec models with shared values or multi-input operations. It imports the typed term language together with the standard primitive families:

For a chain of unary layers, NN.GraphSpec.Chain.Lowering provides the lighter sequential notation, and NN.GraphSpec.Chain.ToDAG.Model lowers it into this representation. Use the DAG language directly for residual connections, shared subexpressions, caches, attention blocks, and other architectures whose dataflow is not a simple chain.