Upper affine bounds #
The one-sided API projects the upper forms of the two-sided CROWN engine. Intermediate lower bounds must be retained: multiplication by a negative weight or subtraction exchanges the two bounds, even when the caller ultimately requests only an upper bound.
def
NN.MLTheory.CROWN.Graph.runAffine
{α : Type}
[TorchLean.Storage α]
[Context α]
[BoundOps α]
(g : IR.Graph)
(ps : ParamStore α)
(ctx : AffineCtx)
(ibp : Array (Option (FlatBox α)))
:
Array (Option (FlatAffine α))
Run CROWN and retain the upper affine form at each node.
Both sides are propagated internally so negative coefficients select the correct parent bound. Rounded backends use the directed coefficient propagation shared with backward CROWN.