Machine Learning

CNN — Convolutional Neural Networks

Slide a kernel over a 1D signal or a 2D image, see every multiply-add, then follow the result through activation and pooling.

Kernel weights (editable)

Tip: click a bar in the input to flip it between 0 and 1.

Input x (length 26)
position 1 / 24
y0 = (0·-1) + (0·0) + (0.10·1) = 0.10 → ReLU → 0.10
Feature map z = x ∗ w + b (before activation) (length 24)
After activation (ReLU) (length 24)
After max pooling (size 2, stride 2) (length 12)

Output length = ⌊(W − K + 2P) / S⌋ + 1 = ⌊(26 − 3 + 2·0) / 1⌋ + 1 = 24. The same 3 weights are reused at every position — this is weight sharing. A strong response means the local pattern matches the kernel's shape.

Note: like deep-learning libraries, this tool computes cross-correlation (the kernel is not flipped), which is what CNN layers call "convolution".