Course contentsShow
← Machine Learning and Deep Learning
Lesson 897 of 3,53821. CNN ArchitecturesFree lesson

Global Average Pooling vs Fully Connected

Learn why GoogLeNet replaced large FC layers with global average pooling to reduce parameters drastically.

Global Average Pooling vs Fully Connected

What you'll learn: How GoogLeNet drastically reduced parameters by replacing massive fully connected layers with global average pooling.

The Traditional Problem

In earlier CNN architectures like AlexNet and VGGNet, the final layers were typically fully connected (FC) layers that served as the classification head. These FC layers connected every feature from the convolutional layers to every output class, creating an enormous number of parameters.

For example, if your final convolutional layer outputs a 7×7×512 feature map, flattening it gives you 25,088 values. Connecting this to just 1000 output classes requires 25 million parameters in a single layer! This leads to:

  • Massive memory requirements
  • Severe overfitting risk
  • Longer training times

GoogLeNet's Revolutionary Solution

GoogLeNet introduced global average pooling (GAP) as a replacement. Instead of flattening and connecting everything:

  1. Take each of the final feature maps (one per output class)
  2. Average all spatial positions within each map into a single number
  3. Use these averaged values directly as class scores

Think of it like this: traditional FC layers are like having thousands of judges evaluate every tiny detail independently. Global average pooling is like having each judge provide one overall score based on their complete impression.

The Impact

By using GAP instead of large FC layers, GoogLeNet reduced parameters from tens of millions to nearly zero in the classification head while maintaining accuracy. The network learns to create feature maps where higher average activation indicates the presence of that class.

Key Takeaway: Global average pooling replaces parameter-heavy fully connected layers by spatially averaging each feature map, dramatically reducing model size and overfitting while preserving classification performance.