Mathematical Specifications #
Import this file when you want TorchLean’s spec layer: shapes, tensors, layers, modules, and model constructors.
If you're writing specs or proofs, this is usually the right place to start. If you're trying to
run models (autograd, training loops, import/export), use NN.API for the public application
interface or NN.Runtime for the complete executable subsystem.
Structure:
NN.Spec.Corefor the core tensor/shape mathematics,NN.Spec.Layers.*for layer-level denotational semantics,NN.Spec.Module.*for PyTorch-style module wrappers over those specs,NN.Spec.Models.*for reusable model constructors,NN.Spec.Autograd.*/NN.Spec.Dynamics.*for auxiliary math-first interfaces.
The user-facing tensor constructors and notation live in NN.Tensor and are intentionally not
re-exported here.