ap.Abhishek Patel

Search

Search notes, essays, projects, the library and the AI course. Use arrow keys to choose and Enter to open.

Module 28

Robust Deep Learning and Computer Vision

Turn notebook experiments into dependable training code, then make deep networks actually train. You restructure PyTorch into Dataset, DataLoader, Model and Trainer classes, diagnose vanishing and exploding gradients with real measurements, and fix them with ReLU, ELU, initialisation, BatchNorm and clipping. Finally you build a convolutional network end to end for photo classification, with augmentation and honest per-class evaluation.

By the end of this module you can

  • structure PyTorch projects into Dataset, DataLoader, model and Trainer classes with configs, seeds and complete checkpoints
  • measure gradients layer by layer and explain why deep networks stall or explode
  • choose between ReLU and ELU, apply Kaiming initialisation, BatchNorm and gradient clipping, and know when each helps
  • explain convolution, feature maps, padding and pooling, and compute a CNN’s output shapes by hand
  • train and evaluate a CNN with data augmentation, per-class accuracy and a confusion matrix

Lessons

3 in this module
  1. 01Clean PyTorch: Dataset, DataLoader, Model, TrainerRestructure a notebook model into Dataset, DataLoader, model and Trainer classes with a config, a seed, a time-based split and a checkpoint that carries its own normalisation statistics.30 min
  2. 02Vanishing gradients, ReLU vs ELU and BatchNormMeasure vanishing and exploding gradients in a 20-layer network and fix them with ReLU or ELU, Kaiming initialisation, batch normalisation and gradient clipping.30 min
  3. 03CNNs end to endBuild, train and evaluate a convolutional network for photo classification, with augmentation, shape calculations by hand, per-class accuracy and a confusion matrix.35 min