Deep Learning
Learn deep learning from scratch using one consistent, real-world example: a spam email classifier. Every tutorial below uses the same email features and the same PyTorch code style, so you can focus on the ideas without switching examples.
Recommended Learning Path:
- Part 1: Understanding Neurons and Neural Networks — Turn a real email into numbers, multiply by weights, add a bias, apply sigmoid, and produce a spam probability. Includes a neural network diagram.
- Part 2: From Machine Learning to Deep Learning — Compare hand-crafted spam features with learned features, and see why hidden layers and non-linearity matter.
- Part 3: Tensors and Tensor Operations — The same email features as tensors: shapes, batches, matrix multiplication, broadcasting, and GPU movement.
- Part 4: Data Handling with Dataset and DataLoader — Build a spam
Dataset, create batches, shuffle, split train/val/test, and normalise features. - Part 5: Parameters in PyTorch — Weights, biases,
requires_grad, parameter counting, freezing, initialisation, saving, and loading using the spam model. - Part 6: Forward and Backward Propagation — A worked numerical example showing exactly how forward prediction and backpropagation with the chain rule update a two-layer spam model.
- Part 7: Cognitive Analogies — Brain-inspired Learning — How spam detection mirrors neurons, synapses, memory, attention, and generalisation in the brain.
- Part 8: Deep Learning Cheat Sheet — Formulas, memory tricks, and quick reference, all using the spam example.
- Part 9: Convolutional Neural Networks (CNNs) — Moves from email features to images: convolution, activation, feature maps, padding, and pooling, explained from zero with diagrams, then a full layer-by-layer walkthrough of the real VGG16 architecture.
- Part 10: Advanced Convolutional Neural Networks — A simple second CNN topic covering the degradation problem, data augmentation, dropout, batch normalization, residual connections, 1x1 bottleneck convolutions, global average pooling, CNN backpropagation through filters, feature maps, ReLU, and pooling, transfer learning, and freezing layers — with diagrams throughout.
- Part 11: CNN Training Pipeline, Transfer Learning, and Visualization — The full CNN model design workflow: problem exploration, data collection and annotation, preprocessing (noise removal, resizing, normalization), augmentation, train/validation/test splits, training from scratch versus transfer learning versus fine-tuning, and CNN visualization with Grad-CAM to understand what the model actually learned.
- Part 12: Building a CNN End-to-End — CIFAR-10 with PyTorch — A complete hands-on walkthrough: load and preprocess CIFAR-10, define a CNN with batch normalization and dropout, write the training and validation loop, plot learning curves, and evaluate with accuracy, confusion matrix, and classification report.
- Part 13: CNN Applications — Overview of the five main CNN application areas: image classification, object detection (YOLO, Faster R-CNN), image segmentation (U-Net, Mask R-CNN), facial recognition (FaceNet, ArcFace), and optical character recognition (OCR/CRNN) — with real-world examples and key architectures for each.
- Part 14: Faster R-CNN and Region Proposal Networks — A paper-style walkthrough of the R-CNN family: why region proposals are needed, how Fast R-CNN shared a feature map, and how Faster R-CNN’s RPN makes proposals nearly free.
- Part 15: RNN — Recurrent Neural Networks — Why normal networks fail on sequences, how hidden states carry memory, backpropagation through time, vanishing/exploding gradients, and gradient clipping.
- Part 16: LSTM and GRU — Gated recurrent networks, the cell state highway, LSTM’s three gates, GRU’s update and reset gates, and how to choose between them.
- Part 17: RNN Use Cases — Time-series forecasting, sequence classification, sequence labelling, language modelling, machine translation, padding, masking, and when to use
h_nvsoutput. - Part 18: Activation and Output Functions — Softmax, sigmoid, log-softmax, sparsemax, argmax, ReLU, and tanh: formulas, output ranges, and a decision table for choosing the right one.
What You’ll Learn:
- How a real email becomes a tensor of numbers
- How a single neuron computes a weighted sum, adds a bias, and applies an activation
- How sigmoid turns a raw score into a spam probability
- Why hidden layers can learn feature combinations like “many links + unknown sender”
- The difference between traditional ML feature engineering and deep learning feature learning
- How tensors represent emails, weights, and biases in PyTorch
- How to batch, shuffle, split, and normalise data with
DatasetandDataLoader - How PyTorch creates, tracks, and updates parameters automatically
- How forward and backward propagation work step by step with the chain rule
- How deep learning mirrors brain concepts like memory, attention, and generalisation
- Memory tricks for every formula and concept
- Why images need convolution instead of fully connected layers, and how kernels, feature maps, padding, and pooling work
- The exact output-size and parameter-count formulas for convolutional layers, plus a full walkthrough of VGG16’s 16 weight layers and ~138 million parameters
- How advanced CNNs improve training with augmentation, dropout, batch normalization, residual connections, global average pooling, 1x1 bottleneck convolutions, CNN backpropagation, and transfer learning
- How to build the full CNN training pipeline: data collection, annotation, preprocessing, normalization, augmentation, and splitting
- When to train from scratch, when to use transfer learning, and when to fine-tune
- How Grad-CAM visualizes where a CNN looks and why this matters for catching shortcut learning
- How to build and train a complete CNN on CIFAR-10 in PyTorch from data loading to evaluation
- The five main CNN application areas: classification, detection, segmentation, facial recognition, and OCR — what each task is, how CNNs solve it, and key architectures
All guides use friendly explanations, real-world examples, and working PyTorch code you can run yourself.