Implement adaptive two-dimensional average pooling with variable, possibly overlapping regions for arbitrary output sizes.