Neural Sync Active
๐ผ๏ธ Convolutional Neural Networks
Registry Synced
๐ผ๏ธ Convolutional Neural Networks
294 words
1 min read
Reading compass
Now ยท 1. ๐ฏ Learning Objectives
๐ผ๏ธ Convolutional Neural Networks
1. ๐ฏ Learning Objectives
- Compute convolution output dimensions: (n+2pโf)/s+1
- Explain the purpose of padding and stride
- Compare pooling types: max vs average
- Identify key architectural innovations in LeNet, AlexNet, VGG
2. ๐ Core Content
3.1 Convolution Operation
A convolution applies a kernel (filter) across the input:
3.2 Output Size Formula
Houtโ=โsHinโ+2pโfโ+1โWhere:
- Hinโ: Input height
- f: Filter/kernel size
- p: Padding
- s: Stride Example: Input 32ร32, filter 5ร5, padding 0, stride 1: (32+0-5)/1+1 = 28. Output: 28ร28.
3.3 Padding
- Valid padding (p=0): No padding. Output smaller than input.
- Same padding: p=(fโ1)/2. Output same size as input.
- Only possible with odd filter sizes (3, 5, 7...).
3.4 Stride
Stride s > 1 downsamples the input. Higher stride = smaller output.
3.5 Pooling
Max pooling: Take maximum value in each window. Average pooling: Take average value in each window.
Typically 2ร2 with stride 2: halves spatial dimensions.
3.6 CNN Architectures
| Architecture | Year | Key Innovation | Parameters |
|---|---|---|---|
| LeNet-5 | 1998 | First successful CNN | 60K |
| AlexNet | 2012 | Deep CNN + ReLU + Dropout + GPU | 60M |
| VGG-16 | 2014 | Very deep (16 layers), 3ร3 conv only | 138M |
| GoogLeNet | 2014 | Inception modules, efficient | 4M |
| ResNet | 2015 | Skip connections (residual blocks) | 25M |
4. ๐ Practice Questions
Q1: Input 224ร224ร3, filters 64 of size 7ร7, padding 3, stride 2. Output size?Answer: H_out = (224 + 2ร3 - 7)/2 + 1 = (224+6-7)/2 + 1 = 223/2 + 1 = 111.5 + 1 = 112 (assuming integer division). Actually: (224+6-7)/2 + 1 = 223/2 + 1 = 111.5 + 1 = 112.5 โ floor 112. Output: 112ร112ร64. Join Discord PreviousCNN OperationsNextCNN Architectures