CNNs
Convolutional Neural Networks for image recognition.
For a small example, a 3x3 filter moves over a tiny grayscale image. Compute one dot product per location and see where the resulting feature map responds strongly.
Convolutional Neural Networks for image recognition.
For a small example, a 3x3 filter moves over a tiny grayscale image. Compute one dot product per location and see where the resulting feature map responds strongly.
A classifier detects visual defects under varying lighting. Augment realistically, split by production batch, compare transfer learning, and visualize failures across defect sizes.
Initializing Interactive Playground...
Predict how one control changes the CNNs result.
The starter deliberately follows a tempting but flawed assumption: Using random crops that destroy the target
Check: The browser checks pass and you can name the failure mechanism before opening the explanation.
Failing starter lab
Given input size, kernel, stride, and padding, return the spatial output length.
Run the incomplete starter before opening hints. Use the first wrong output or failed check to form a repair hypothesis.
Explanations after each answer · 80% to pass · CNNs
Chapter 1 of 10 · Core
In mathematical analysis, a convolution between a continuous input signal and a filter kernel is defined as the integral of the product of the two functions after one is reflected and shifted: For discrete 2D applications like computer vision, a 2D convolution of an image with an odd square kernel is defined as: where . The spatial reflection of the kernel (represented by the minus sign in index subtraction) is necessary for convolution to satisfy the mathematical property of associativity: .
In practical deep learning libraries (e.g., PyTorch, TensorFlow), the operation implemented under the name "convolution" is actually cross-correlation, which omits the spatial reflection step:
Because the kernel parameters are learned from scratch during backpropagation, spatial reflection is mathematically redundant. If reflection were applied, the network would simply learn a flipped version of the kernel. Omitting the flip saves computational overhead.
The spatial dimensions of a convolutional layer's output feature map depend on input width , kernel size , padding , stride , and dilation rate (which inserts spaces between kernel elements): Dilation expands the receptive field without changing the kernel's parameter count or multiply-accumulates per output position. Total work and runtime still depend on output dimensions, padding, memory access, and implementation.
Key equations
MIT 6.S191: Convolutional Neural Networks
MIT Introduction to Deep Learning
See filters, spatial hierarchies, and modern vision architectures in a university lecture.
Primary sources and free technical reading for CNNs.
Free interactive book with executable implementations of neural networks, sequence models, CNNs, and Transformers.
The AlexNet paper connecting convolutional design choices to large-scale visual recognition.