StudyHub

ML/DL · Hub

Deep learning

Twenty-five pages, in learning order: the neuron and its activations, how networks are trained (forward pass, backpropagation, losses, optimisers), how they are regularized, and the main architectures: CNNs, RNNs, LSTMs, GRUs, attention and Transformers, transfer learning, autoencoders, GANs and VAEs.

Why it matters: every modern AI system, from image recognition to language models, is built from these pieces. Knowing what each one computes, with real numbers, makes the big models far less mysterious.

5 random questions mixed from all twenty-five deep-learning pages.

Quick comparison

GroupPagesKey idea
Neurons and activationsNeuron, activation functions, MLP$a = g(w^\top x + b)$, stacked in layers
TrainingForward prop, backprop, losses, GD, SGD, momentum, Adam, RMSProp$w \leftarrow w - \eta \nabla L$
RegularizationDropout, batch norm, early stoppingGeneralise, don't memorise
ConvolutionalCNN, poolingShared small filters over images
RecurrentRNN, LSTM, GRUA hidden state carried through time
AttentionAttention, Transformer$\text{softmax}(QK^\top/\sqrt{d})V$
Reuse and generationTransfer learning, autoencoder, GAN, VAEReuse features; learn to generate data

The twenty-five pages

The artificial neuron

Weighted sum, bias, activation.

x = [2, 3] → z = 0.2 → σ = 0.55

Study

Activation functions

Sigmoid, tanh, ReLU, Leaky ReLU, softmax.

ReLU inside · sigmoid/softmax at the output

Study

Multi-layer perceptron

Fully connected layers with a hidden layer.

params = n_in·n_out + n_out per layer

Study

Forward propagation

Compute layer by layer, cache everything.

z → a → … → ŷ → loss

Study

Backpropagation

Chain rule backwards through the network.

∂L/∂w = (a − y)·x for sigmoid + CE

Study

Loss functions

MSE for numbers, cross-entropy for probabilities.

CE = −ln p(true class)

Study

Gradient descent

Step against the slope.

w ← w − η∇L · η too big → diverges

Study

SGD and mini-batches

Cheap, noisy gradient estimates.

n/m updates per epoch

Study

Momentum

A velocity that accumulates gradients.

v ← βv + g · up to 10× speed-up

Study

Adam

Momentum + per-weight scaling + bias correction.

default optimiser · lr 0.001

Study

RMSProp

Divide by the RMS of recent gradients.

per-weight step sizes

Study

Dropout

Randomly switch neurons off in training.

scale kept by 1/(1 − p) · off at test

Study

Batch normalization

Normalize per batch, learned γ and β.

running stats at test time

Study

Early stopping

Stop at the validation minimum.

patience · restore best weights

Study

Convolutional networks

Shared filters slide over the image.

out = (W − F + 2P)/S + 1

Study

Pooling

Keep the strongest value per block.

2×2 max pool: 4× fewer values · 0 params

Study

Recurrent networks

A hidden state carried through a sequence.

h_t = tanh(W h_{t−1} + U x_t) · gradients vanish

Study

LSTM

Gated, additive long-term memory.

forget, input, output gates

Study

GRU

Two gates, no separate cell state.

update + reset · ~3/4 of an LSTM

Study

Attention

Weighted mix of values by query–key match.

softmax(QKᵀ/√d)V · O(n²)

Study

Transformer

Attention + feed-forward blocks, stacked.

4d² + 2d·d_ff weights per block

Study

Transfer learning

Reuse a pretrained network, retrain the head.

1,026 trainable weights on a frozen ResNet

Study

Autoencoder

Reconstruct the input through a bottleneck.

no labels · error flags anomalies

Study

GAN

A generator and a discriminator compete.

equilibrium: D = 0.5

Study

Variational autoencoder

Encode a distribution; reconstruction + KL.

z = μ + σε · sample N(0, 1) to generate

Study

Which one to pick?

flowchart TD
  A{"What is your data?"} -->|"images"| C["CNN + pooling (or transfer learning if data is small)"]
  A -->|"sequences: text, audio, time series"| S{"Long sequences, lots of data?"}
  S -->|yes| T["Transformer (attention)"]
  S -->|"no, small and simple"| R["LSTM / GRU"]
  A -->|"tables of features"| M["MLP (or gradient boosting)"]
  A -->|"want to generate new data"| G{"Sharp samples or a smooth latent space?"}
  G -->|sharp| GAN["GAN"]
  G -->|smooth latent space| VAE["VAE"]
  A -->|"unlabelled, want compression or anomalies"| AE["Autoencoder"]
      

Key points

External resources

Videos

Review schedule

Come back after 3, 7, 14, then 30 days. Spacing beats cramming.

Feynman prompt

Explain this topic in your own words, as if teaching a beginner.

Explain it in your own words first, then record a 2–3 minute video on your phone.

25:00

Ready to record? Open your phone camera now and record a 2–3 minute explanation.

My notes

Saved only in this browser (localStorage). Nothing is uploaded.