The cifar8-bn step tie at its UN-FUSED gradient nodes — the packed cifar8w_bn_* arms #
Cifar8BnTie.cifar8Bn_train_step_tied_certified ties the fused-SGD render
(cifar8BnTrainStepText at opt := none). The artifacts the book's Chapter-4 runs train
(cifar8w_bn_{sgd,mom,adam}_train_step.mlir, and the narrow cifar8_bn_* width sweep) are the same
renderer at opt := some _: the same forward and backward chain, feeding *Grad ops (the *Sgd
arms with θ − lr· stripped) to a separate optimizer. This file states those nodes, each at the
same chain cotangent: all 38 parameter tensors, via GradNode (Foundation/SgdNodes.lean). The
optimizer update that consumes them (SGD, Nesterov, AdamW) is outside the statement.
Scope (as the fused tie) #
- Below the output layer the cotangents are the rendered chain.
cifar8Bn_net_lossGrad(Cifar8BnParamGrad) states each node as the loss gradient in its parameter, with each pool's cotangent routed to one maximal cell, as the renderedselect_and_scatterdoes; this chain'sBack3.maxpoolroutes it to the first maximal cell (maxPool2Argmax), the op's own choice, so each pool step is the capstone's scatter at that selection (SmallParamGrad.maxpool_flatDenote_eq_selScatter). - Conv/BN backward rendered hand-written (cotangent SSA ↔ chain-cot per-op trust); per-op
prettylexing; ℝ → Float32.
Whole cifar8-bn train step at its gradient nodes. All 38 parameter tensors (8 conv W+b,
8 BN γ+β, 3 dense W+b), at the real cifar8-bn forward: each emitted *Grad node denotes
the certified per-layer Jacobian contracted with the rendered backward-chain cotangent, driven
by the composed softmax-CE cotangent g — the fused tie's chain, node for node.