Skip to content
Tag

Everything tagged #deep-learning

10 articles, newest first.

Articles tagged #deep-learning

ResearchNov 19, 2026 · 4 min read

Why Loss Functions Use the Log, and KL Divergence

Multiplying probabilities across a dataset collapses to zero in float32, while raw exponentials blow up to infinity. Derive why logarithms turn probability products into sums, how the log-sum-exp trick prevents overflow, and how KL divergence compares full probability distributions.

124 min read
ResearchNov 19, 2026 · 8 min read

Loss Functions: Measuring Model Error

A neural network cannot learn from a prediction that is merely called wrong. Build MSE, MAE, binary cross entropy, and multiclass cross entropy from first principles, then see why PyTorch classification losses take logits directly.

28 min read
ResearchNov 19, 2026 · 20 min read

GELU, SiLU, and Softmax: Choosing by Layer

ReLU unlocked deep networks with a sharp corner at zero, yet leaves no middle ground for mildly negative evidence or competing output scores. Derive ELU, GELU, SiLU, Softplus, and Softmax from first principles, and choose the right activation for every layer role.

220 min read
ResearchNov 19, 2026 · 13 min read

Activation Functions: Why ReLU Replaced Sigmoid

Sigmoid and tanh look smooth and well-behaved until their tails flatten out and choke deep training signals. Derive every curve, slope, and derivative behind sigmoid, tanh, ReLU, and Leaky ReLU to see why modern networks switched.

13 min read
ResearchNov 19, 2026 · 19 min read

Counting Neural Network Parameters and FLOPs

One hidden layer can approximate a wide range of continuous functions, yet every extra neuron demands memory and arithmetic. Derive parameter counts, forward FLOPs, batch scaling, and widening behavior directly from weight matrix shapes.

19 min read
ResearchNov 19, 2026 · 20 min read

From One Neuron to Deep Neural Networks

A single neuron multiplies inputs by weights, adds a bias, and draws one straight boundary. That works until a pattern like XOR refuses to separate cleanly. Stacking layers with nonlinear activations bends the space so a network can build representations step by step.

20 min read
EngineeringSep 11, 2026 · 4 min read

Datasets and DataLoaders: Keeping the GPU Fed

You bought a fast GPU and it's sitting at 30% utilisation. The model isn't the bottleneck. The input pipeline is. Here's how Dataset and DataLoader work, and how to stop starving the accelerator.

1144 min read
EngineeringSep 10, 2026 · 5 min read

nn.Module: Building Networks That Hold Together

nn.Sequential is training wheels. Real models are custom Modules with skip connections, shared weights, and branches. Here's how nn.Module actually works, and every footgun it hides.

5 min read
EngineeringSep 09, 2026 · 6 min read

Autograd: How PyTorch Learns

Every training loop on Earth is basically the same four lines. The one that does the real work, loss.backward(), is a graph PyTorch builds while your code runs and then walks backwards. Let's take it apart.

36 min read
EngineeringSep 08, 2026 · 8 min read

PyTorch: From Tensor to Neural Network

People think PyTorch is enormous. It isn't. It's one data structure and a pile of operations on it, and once that clicks, every model you'll ever read looks obvious. Here's the ground floor.

68 min read