Deep learning visualizer
CNN Operations Visualizer
See how filters extract features and pooling reduces spatial dimensions.
Input7 x 7Kernel3 x 3Stride1Output5 x 5
Kernel (3 x 3)
Input Matrix
7 x 70000000001221000122100012210001221000122100000000
Kernel
3 x 3-101-101-101
Feature Map
5 x 5Press Run or Step to calculate the first output cell.Ready: 0 of 25
Kernel pass0 / 25Output cells calculated
WindowPendingCurrent input region size
Settingss1 p0 d1Stride, padding, dilation
Input7 x 7 x 1
Convolution3 x 3 / p=0
ActivationRELU
PoolingMax 2 x 2
Output2 x 2
How it works
- A small kernel slides over the input matrix using the selected stride, padding, and dilation.
- At each position, matching input and kernel cells are multiplied and summed.
- The feature map is passed through an activation function.
- Pooling compresses local regions while keeping strong features.
Y[i,j] = sum X[i+m, j+n]K[m,n] + b
import numpy as npdef conv2d(x, kernel, stride=1, padding=0):x = np.pad(x, padding)h = (x.shape[0] - kernel.shape[0]) // stride + 1out = np.zeros((h, h))for i in range(h):for j in range(h):region = x[i*stride:i*stride+3, j*stride:j*stride+3]out[i, j] = np.sum(region * kernel)return out