Classic CNNs ended by flattening the final feature maps into a huge vector and feeding it to a dense layer — millions of parameters, and prone to overfitting. Global average pooling replaces all of that: collapse each channel to its own mean, and a C × H × W block becomes C numbers.
Task: write global_average_pooling(feature_maps), where feature_maps[c] is a 2D list for channel c. Return one mean per channel, rounded to 4 decimal places.
It has no parameters at all, which is the appeal, and it accepts any input resolution since the output size depends only on the channel count. It also makes each channel's contribution directly readable — the idea class activation maps are built on.