An ONNX model with dilated average pooling could load into Burn and give wrong numbers without a single error. The 2D import just dropped the dilation.
antimora opened issue #6148 to fix that at the source, and I added the missing option in tracel-ai/burn#6235 . The trick was not inventing anything new.
Two quick definitions
Burn is a Rust framework for building and training neural networks. Pooling shrinks a grid of numbers (a tensor) by sliding a small window over it and keeping one value per spot: the max, or the average.
Dilation puts gaps in that window. A 2 by 2 window with dilation 2 reads four cells spaced two apart, like jumping two squares at a time on a chessboard, so it spans a 3 by 3 area. ONNX, the common format for sharing trained models, has supported dilation on AveragePool since opset 19. Burn's max pooling had it.…