The conv forward in floating point — conv as a weight-shared dense layer, and its rounding budget #
The 2D conv read as a dense layer over the zero-padded window (convPad, k4Idx, w3Idx,
convWindow), the kernel drift that makes it Lipschitz in the weights, and the float conv:
convF / flatConvF and the flatConvF_close budget every float conv-net bridge composes
(ResNet-34's strided convs through ResNet34FloatBridge).
The whole MNIST-CNN forward budget built from them is in SgdDescentCnn.
Flat index of a Kernel4 entry (the suite's row-major layout).
Equations
- Proofs.k4Idx o c kh kw = finProdFinEquiv (finProdFinEquiv (finProdFinEquiv (o, c), kh), kw)
Instances For
Kernel4.flatten reads off at a k4Idx — the forward peer of
unflatten_k4Idx, lifting a per-entry kernel bound to the flattened vector.
Flat index of a conv window slot (c, kh, kw) — k4Idx without the
output channel (row-major, fan-in ic·kH·kW).
Equations
- Proofs.w3Idx c kh kw = finProdFinEquiv (finProdFinEquiv (c, kh), kw)
Instances For
The triple conv-window sum collapses to one flat sum over the fan-in —
the conv analogue of dot being a single-index sum (mirrors sum_abs_k4,
one fewer axis).
The per-output-coordinate conv window as a flat Vec over the fan-in:
the (padded) input reads that the kernel slab dots against.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The kernel as a Mat (ic·kH·kW) oc — column o is the flattened slab.
Equations
- Proofs.convKernelMat W idx o = W o (finProdFinEquiv.symm (finProdFinEquiv.symm idx).1).1 (finProdFinEquiv.symm (finProdFinEquiv.symm idx).1).2 (finProdFinEquiv.symm idx).2
Instances For
conv2d is a dense layer at the conv fan-in — conv = dense-with-sharing
made exact: each output coordinate is Proofs.dense of the kernel slab
against the flattened window. The structural fact that lets the float conv
budget reuse dense_close.
Padded reads of inputs within e stay within e (the read is either a
coordinate, diff ≤ e, or 0, diff 0).
The float conv layer — M.dense of the kernel slab against the
flattened window, per output coordinate. The float peer of conv2d
(every product/accumulate/bias-add rounded), in the dense form.
Equations
- M.convF W b x o hi wi = M.dense (Proofs.convKernelMat W) b (Proofs.convWindow kH kW x hi wi) o
Instances For
Conv forward rounding budget (Item A). The rounded conv at a float input
within e of the real activation is within the conv-fan-in denseErr of the
real conv — dense_close at the flattened window. The compounded Higham
factor rides the fan-in ic·kH·kW (the dense column length here), exactly as
the planning doc calls for.
Conv output magnitude bound = dense_abs_le at the fan-in: conv is a
dense layer, so |conv2dⱼ| ≤ layerAct (ic·kH·kW) w β a.
Vec-space float conv — the float peer of flatConv
(flatten ∘ conv2d ∘ unflatten), with the rounded convF inside.
Equations
- M.flatConvF W b v = (M.convF W b (Proofs.Tensor3.unflatten v)).flatten
Instances For
Vec-space conv forward budget, uniform. The rounded flatConvF at a
float input within e of the real activation is within the conv-fan-in
layerBudget of the real flatConv — every output coordinate, one closed
form. The conv layer threads exactly like a dense layer at fan-in
ic·kH·kW.
Vec-space conv magnitude bound (the activation-norm pass-through).