Deep Learning Fundamentals

Activation Functionsfundamentalssigmoid, tanh, the ReLU family, GELU and softmax, with their derivatives and why they decide whether deep… BackpropagationfundamentalsBackpropagation explained: the chain rule on computational graphs, a fully worked numeric example, gradient… Normalization and DropoutfundamentalsBatch norm, layer norm, RMSNorm and dropout explained: formulas, train vs eval behaviour, placement in CNNs… OptimizersfundamentalsNeural network optimizers explained: SGD, momentum, Nesterov, AdaGrad, RMSProp, Adam and AdamW, plus warmup…

The core ideas that every neural network architecture shares: how a network computes, learns and generalises. Start here before the architecture-specific pages.


1. Overview

The Training Loop Every Deep Network Shares Forward pass layers + activations Loss compare to target Backward pass gradients by chain rule Update optimizer step repeat over mini-batches and epochs Fundamentals pages explain each box; architecture pages change what is inside the forward pass.

Deep learning is machine learning with neural networks of many layers, trained end to end by gradient descent. Whatever the architecture (feed-forward, convolutional, recurrent, graph, Transformer), the same loop runs underneath: a forward pass turns inputs into predictions, a loss function scores them, backpropagation computes how each weight affected the loss, and an optimizer nudges the weights. This section collects the building blocks that every architecture relies on, so the architecture pages can focus on what makes each one different.

Most training failures trace back to a fundamentals problem rather than an architecture problem: gradients that vanish because of a poor activation or initialisation, a loss that does not match the output layer, a learning rate that is too high, or a network that memorises the training set. Understanding these pieces makes debugging systematic.

2. How the Pieces Fit Together

A suggested reading order. Begin with activation functions, because they explain why depth needs non-linearity and why some networks will not train at all. Next, revisit the bias-variance trade-off, since almost every deep learning technique beyond the basics is a way of controlling capacity and generalisation. Then move to the architecture pages: the multi-layer perceptron shows the training loop in its plainest form, convolutional networks add weight sharing for images, recurrent networks add state for sequences, and graph networks generalise message passing to arbitrary structures. Each architecture page assumes the vocabulary introduced here, so returning to this section when something is unclear is the fastest way to fill gaps.

3. Which Choice Goes Where

DecisionCommon defaultWhen to change it
Hidden activationReLU (CNN, MLP); GELU or SwiGLU (Transformers)Dead units: Leaky ReLU; recurrent cells: tanh and sigmoid gates
Output + lossSoftmax + cross-entropy; sigmoid + BCE; linear + MSEMulti-label: per-class sigmoid; heavy-tailed targets: Huber loss
InitialisationHe for ReLU-family, Xavier for tanhUsually left to framework defaults
OptimizerAdamWSGD with momentum often generalises well for vision
NormalisationBatchNorm (CNN), LayerNorm (Transformers, RNNs)Small batches: LayerNorm or GroupNorm
RegularisationWeight decay + early stoppingOverfitting persists: dropout, augmentation, more data
Deep LearningSectionarchitectures: feed-forward, CNN, RNN, GNN Multi-Layer Perceptronfeedforwardthe simplest deep network Convolutional Neural NetworksSectionvision architectures Recurrent Neural NetworksSectionsequence models PyTorchframeworksthe framework used in examples Bias-Variance Trade-offfundamentalsgeneralisation fundamentals