CNN Lab

Draw a digit. A convolutional network sees the strokes, slides small filters across the image, and guesses which digit it is. The first-layer feature maps show which filters lit up on your drawing.

Network architecture

Input
28×28×1
→ 3×3 conv →
Conv 1
26×26×8
→ 2×2 pool →
Pool 1
13×13×8
→ 3×3 conv →
Conv 2
11×11×16
→ 2×2 pool →
Pool 2
5×5×16
→ flatten →
Dense
32
→ softmax →
Output
10

A picture (28×28 grayscale) flows left → right. Convolutions find features (edges → shapes), pooling shrinks the map so the network cares about the pattern, not the exact pixel, and the two dense layers vote on which digit it saw. About 12 000 trainable parameters — tiny by modern standards.

Loading TensorFlow.js…

Draw a digit (0 – 9)

Draw with your mouse or finger. Try a 3, 5, or 9.

Prediction

Draw something and press Predict.

Feature maps

Bright pixels = the filter fired there. Layer 1 filters spot simple things (edges, curves). Layer 2 filters take Layer 1's responses as their input, so they combine those simple things into shapes — the classic "shallow → deep" progression.