FDeriv #
Analytic (HasFDerivAt/fderiv) correctness for a Conv2D-shaped bilinear map.
This file adds a proof-only node constructor that treats convolution as a bilinear map
in (kernel, input) plus a linear bias broadcast, and defines its VJP as the adjoint of
the Fréchet derivative. This is enough for the general DAG theorem
Graph.backpropVec_eq_adjoint_fderiv to cover graphs using this node.
Note: the runtime engine uses Spec.conv2d_backward_spec; connecting that
handwritten backward to this analytic VJP is a separate theorem.
The remaining definitions package the convolution computation into linear/bilinear maps on
flattened vectors. This is the standard analytic path: show the forward map is bilinear in
(kernel, input), then take Fréchet derivatives and adjoints.
Output height of conv2d, computed from input height, kernel height, stride, and padding.
Instances For
Output width of conv2d, computed from input width, kernel width, stride, and padding.
Instances For
Shape of the Conv2D kernel parameter K (a OC × IC × KH × KW tensor).
Instances For
Shape of the Conv2D bias parameter b (a length-OC vector).
Instances For
Shape of the Conv2D input X (a IC × IH × IW tensor).
Instances For
Shape of the Conv2D output Y (a OC × OH × OW tensor).