Module 06 Activity
Scenario
Build an image classifier and evaluate it the way an imbalanced real dataset demands.
Task
- Show that a convolution gives the same response to a pattern in two different corners.
- Compute output sizes for four convolution configurations using the size rule, then verify each.
- Trace shapes layer by layer through a CNN and measure the flatten width rather than deriving it.
- Normalise a batch per channel and demonstrate a flip is reversible.
- Evaluate on an imbalanced three-class problem. Report accuracy, then per-class recall.
- Rank errors by confidence and list the three most confident mistakes.
Deliverable
A classifier report: architecture, parameter count, accuracy, majority baseline, confusion matrix, and your three worst errors.
Check your work
out = floor((in + 2*padding - kernel) / stride) + 1. Kernel 3 with padding 1 preserves size.- Two poolings take 28 to 7. With 16 channels the flatten width is 784.
- On the imbalanced example, accuracy looks acceptable while one class has recall 0.00.
The habit
Read per-class recall before accuracy. Accuracy is a summary of the majority class.
