oa::ml::matrix::adaptive_avg_pool_2d

Adaptively average-pool an NCHW Matrix to an exact spatial extent. Each output bin independently uses floor/ceiling boundaries along height and width. This supports rectangular and non-divisible geometry without approximating the operation as a square fixed-window pool. Errors Returns an error unless the input is nonempty rank-four F32, both output extents are nonzero, all geometry fits the shader ABI, or recording fails.

FnRust public API

Function Documentation

pub fn adaptive_avg_pool_2d( input: &Matrix, output_height: usize, output_width: usize ) -> Result<Matrix>
Adaptively average-pool an NCHW Matrix to an exact spatial extent. Each output bin independently uses floor/ceiling boundaries along height and width. This supports rectangular and non-divisible geometry without approximating the operation as a square fixed-window pool. Errors Returns an error unless the input is nonempty rank-four F32, both output extents are nonzero, all geometry fits the shader ABI, or recording fails.