pub fn optimize_sequential(
model: &SequentialModel,
graph: &mut Graph,
) -> SequentialModelExpand description
Scan a SequentialModel and fuse Conv2d + BatchNorm2d patterns.
Returns a new optimized SequentialModel with fewer layers.
Conv2d immediately followed by BatchNorm2d is replaced by a single fused Conv2d.
All other layers (including ReLU after the fused Conv2d) are preserved as-is.