Skip to content

Convolutional Neural Networks: How Deep Nets See

Beginning of the lesson

Convolutional Neural Networks: How Deep Nets See

A regular neural network drowns when you hand it a photo. A convolutional neural network (CNN) is the clever redesign that lets computers actually see — it is the engine behind face unlock, medical scan readers, factory cameras, and self-driving cars. In this lesson you will build the whole idea from scratch, by hand, with real numbers.

What you will be able to do
  • Explain why a plain dense network fails on images (too many weights, no shift-awareness).
  • Describe the convolution operation: a small filter sliding across an image to make a feature map.
  • Work a full convolution by hand and read the output map.
  • Understand weight sharing, and why filters act as edge / corner / texture detectors.
  • Compute output sizes for padding and stride.
  • Do 2×2 max pooling on a real grid.
  • Trace a complete CNN end to end on a 32×32 image, tracking the shape at every stage.
1. Why dense layers drown on images

Remember the networks from earlier lessons: every neuron in a layer connects to every input. We call these dense (or fully-connected) layers. That works fine for a handful of inputs. Images break it in two ways.

Problem 1: an explosion of weights

A modest colour photo might be 1000×1000 pixels, and each pixel has 3 colour values (red, green, blue). That is 1000 × 1000 × 3 = 3,000,000 input numbers. Now suppose the first hidden layer has just 1000 neurons. Every neuron needs one weight per input, so the number of weights is:

3,000,000 inputs × 1000 neurons = 3,000,000,000 weights

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 16
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers