GraphSpec Primitive Packs #
This umbrella re-exports the non-core GraphSpec primitive packs.
GraphSpec primitives are operation adapters, not models:
- a primitive wraps one reusable operation, such as convolution or pooling;
- a model composes primitives into an architecture, such as
twoConvCnnorresidualLinear.
The small always-available primitives (linear, relu, softmax) live in
NN.GraphSpec.Core because they are part of the minimal sequential DSL examples and lowering
interface. Larger domain-specific packs live under NN.GraphSpec.Primitives/* so the core
language does not turn into a catalog of every layer TorchLean supports.
Current extension pack:
NN.GraphSpec.Primitives.Spatial: rank-polymorphic convolution, pooling, flattening, normalization, and global-average-pooling adapters.
Adding a new operation to GraphSpec means giving it both meanings:
- pure Spec semantics for proof/reference use;
- TorchLean program semantics for execution/training.