Global Average Pooling
Core Vision Operations DS practice problem on Onlearn.
Difficulty: easy.
Topics: Understanding Implement Global Average Pooling, Global Average Pooling, Spatial Aggregation, Feature Map Compression, Reduction Axis, Translation Invariance, Computer Vision, Deep Learning, Linear Algebra, Numerical Computing, Software Engineering, CNN Architectures, Tensor Operations, Feature Engineering, Dimensionality Reduction, Array Manipulation.
Implement a function that performs Global Average Pooling on a 3D NumPy array representing feature maps from a convolutional layer. The function should take an input of shape (height, width, channels) and return a 1D array of shape (channels,), where each element is the average of all values in the corresponding feature map.