🖼️

Convolutional Neural Networks Intermediate

Networks that scan images with learnable filters. Draw on a grid and watch convolution, ReLU and pooling produce the output.

4 lessons 12 quiz questions ⚡ Live compiler
Lessons & quizzes Compiler Certificate

📚 Lessons & quizzes

Each lesson ends with its own short quiz. Answer them as you go — score 90% across all lessons to earn your certificate.

1 Seeing with convolutions

A Convolutional Neural Network slides small filters (kernels) across an image, detecting local patterns like edges. Click cells in the grid below to draw a shape and watch the feature map, pooling and output update live.

2 The convolution operation

At each position the kernel is multiplied element-wise with the patch under it and summed — a dot product — producing one number of the feature map. Sharing one kernel across the whole image gives translation invariance and far fewer weights than a dense layer.

function conv2d(img, kernel) {
  const out = [];
  for (let i = 0; i + 3 <= img.length; i++) {
    const row = [];
    for (let j = 0; j + 3 <= img[0].length; j++) {
      let s = 0;
      for (let a = 0; a < 3; a++) for (let b = 0; b < 3; b++) s += img[i+a][j+b] * kernel[a][b];
      row.push(Math.max(0, s)); // ReLU
    }
    out.push(row);
  }
  return out;
}

3 Pooling and depth

Pooling (e.g. 2×2 max) shrinks feature maps, keeping the strongest responses and adding robustness to small shifts. Real CNNs stack many conv+pool blocks so early layers find edges and deeper layers find shapes and objects, ending in dense layers for the prediction.

4 CNNs in the wild

CNNs drive image classification, object detection, segmentation and medical imaging, and the same idea applies to audio spectrograms and even text. Their core advantages are local connectivity and weight sharing, which exploit the structure of grid data.

⚡ Convolutional Neural Networks Compiler

Code runs live in a sandboxed frame, rendered by your browser.

JS

            

🎓 Certificate of Completion

🔒 Complete every lesson quiz above with 90%+ to unlock your downloadable certificate.