Quiz 2
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+2pf)/s+1(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:
(IK)(i,j)=mnI(i+m,j+n)K(m,n)(I * K)(i,j) = \sum_m \sum_n I(i+m, j+n) \cdot K(m,n)

3.2 Output Size Formula

Hout=Hin+2pfs+1H_{out} = \left\lfloor \frac{H_{in} + 2p - f}{s} + 1 \right\rfloor
Where:
  • HinH_{in}: Input height
  • ff: Filter/kernel size
  • pp: Padding
  • ss: 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=(f1)/2p = (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

ArchitectureYearKey InnovationParameters
LeNet-51998First successful CNN60K
AlexNet2012Deep CNN + ReLU + Dropout + GPU60M
VGG-162014Very deep (16 layers), 3×3 conv only138M
GoogLeNet2014Inception modules, efficient4M
ResNet2015Skip 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
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.