Pure semantics of sequential GraphSpec chains #
The interpreter splits the typed parameter pack at each sequential composition and applies the two subchains in order. It is intentionally direct, so proofs about chains need not pass through their SSA/DAG representation.
def
NN.GraphSpec.Interp.spec
{ps : List Spec.Shape}
{σ τ : Spec.Shape}
(g : Chain ps σ τ)
{α : Type}
[TorchLean.Storage α]
[Context α]
:
TorchLean.TensorPack α ps → TorchLean.Tensor α σ → TorchLean.Tensor α τ
Pure tensor semantics of a sequential Chain.