Average pooling is a downsampling operation that reduces the spatial dimensions of a feature map by computing the mean value within non-overlapping rectangular regions. Unlike max pooling which selects the strongest activation, average pooling captures the overall presence of features in each region.
Given a 2D matrix and a pool size, apply average pooling with non-overlapping windows (stride equal to pool size).
Return the pooled two-dimensional list of floats.
Input: X = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]], pool_size = 2
Output: [[3.5, 5.5], [11.5, 13.5]]
Explanation: Each non-overlapping 2 by 2 block contributes its arithmetic mean.
Input: X = [[10, 20], [30, 40]], pool_size = 2
Output: [[25.0]]
Use integer division to count complete pooling windows along each dimension.
Sum one window at a time and divide by pool_size squared.
Sign in to take notes on this problem
Accepts: array
Accepts: number
Average pooling is a downsampling operation that reduces the spatial dimensions of a feature map by computing the mean value within non-overlapping rectangular regions. Unlike max pooling which selects the strongest activation, average pooling captures the overall presence of features in each region.
Given a 2D matrix and a pool size, apply average pooling with non-overlapping windows (stride equal to pool size).
Return the pooled two-dimensional list of floats.
Input: X = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]], pool_size = 2
Output: [[3.5, 5.5], [11.5, 13.5]]
Explanation: Each non-overlapping 2 by 2 block contributes its arithmetic mean.
Input: X = [[10, 20], [30, 40]], pool_size = 2
Output: [[25.0]]
Use integer division to count complete pooling windows along each dimension.
Sum one window at a time and divide by pool_size squared.
Sign in to take notes on this problem
Accepts: array
Accepts: number