Input Image 8 × 8
Feature Map (Convolution Output) 6 × 6

Filter / Kernel Editor

Press Animate or Step to begin

Controls

5

Convolutional Neural Networks

A Convolutional Neural Network (CNN) learns spatial patterns in data by sliding small filters (kernels) across the input. Each filter detects a specific feature like edges, textures, or shapes.

How to Use

  • Select an input image pattern from the dropdown
  • Choose a filter preset or edit kernel values directly
  • Press Animate to watch the filter slide across the input
  • Press Step to advance one position at a time
  • Adjust stride and padding to see how they affect output size

Convolution Steps

  1. Place the filter at the top-left of the input
  2. Multiply each filter weight by the corresponding input value
  3. Sum all products to get one output value
  4. Slide the filter by stride pixels and repeat
  5. Continue until the filter has covered the entire input

Pooling

  • Max Pooling — takes the maximum value in each window
  • Average Pooling — takes the mean of values in each window
  • Pooling reduces spatial dimensions and provides translation invariance

Convolution Formula

O(i,j) = ∑mn I(i·s+m, j·s+n) · K(m,n)

Where I is the input, K is the kernel, s is stride, and O is the output feature map.

Output Size Formula

Osize = ⌊(Isize - Ksize + 2P) / S⌋ + 1

Isize = input size, Ksize = kernel size, P = padding, S = stride.

Parameters

  • A 3×3 kernel has 9 learnable parameters (plus optional bias)
  • The same kernel is applied at every spatial location (weight sharing)
  • This drastically reduces parameters vs. fully connected layers

Convolution Metrics

Input Size 8 x 8
Filter Size 3 x 3
Output Size 6 x 6
Stride 1
Padding None
Min Output -
Max Output -
Status Ready

Pooling (2×2)