Course contentsShow
← Machine Learning and Deep Learning
Lesson 878 of 3,53820. Convolutional Neural Networks: FundamentalsFree lesson

Fully Connected Layers as Classification Heads

Understand how CNNs transition from convolutional feature extraction to dense layers for final classification decisions.

Fully Connected Layers as Classification Heads

What you'll learn: How CNNs transition from extracting spatial features to making final classification decisions using fully connected layers.

The Bridge from Features to Predictions

After your CNN's convolutional and pooling layers extract rich spatial features from images, you need to actually make a decision—is this a cat or a dog? Which of 1000 ImageNet classes? This is where fully connected (dense) layers come in as the "classification head."

From Feature Maps to Decisions

Think of it like an assembly line: the convolutional layers are specialized workers identifying edges, textures, and patterns. By the final conv layer, you have high-level feature maps—but they're still spatial grids of numbers. To classify, you need to:

  1. Flatten these 3D feature maps into a 1D vector
  2. Pass through one or more fully connected layers that combine all features
  3. Output a final layer with neurons equal to your number of classes

Why Fully Connected Layers?

The convolutional layers preserve spatial relationships but operate locally. Fully connected layers let the network consider all features together holistically. Each neuron in the FC layer connects to every feature from the flattened vector, learning which combinations of features indicate each class.

The final FC layer typically has num_classes outputs, one per category, followed by softmax (during training) to produce class probabilities.

Typical Pattern

Conv layers → Feature Maps (e.g., 512×7×7)
    ↓ Flatten
Dense vector (25,088 values)
    ↓ FC Layer(s)
Class scores (e.g., 10 outputs for 10 classes)

Key Takeaway: Fully connected layers serve as the decision-making head of a CNN, combining all extracted features to output final class predictions after the convolutional backbone does feature extraction.