LATENT LIBRARY DEEP LEARNING Neural NetworksFrom Scratch Build, Train and Understand EveryPiece LATENT LIBRARY EDITORIAL

Neural Networks From Scratch

Build, Train and Understand Every Piece

Latent Library Editorial

IntroductionIntroduction

Deep-learning libraries let you train a neural network in a dozen lines without understanding a single step. That convenience has a cost: when training fails, as it often does, you have no idea why. Loss curves that explode, accuracy stuck at chance, models that memorise instead of learning: each has causes you can diagnose only if you know what happens inside.

This book takes the opposite route. You will build a neural network from first principles, piece by piece: a single neuron, then layers, activation functions, loss functions, backpropagation and gradient descent. You will then improve training with initialisation, better optimisers, normalisation and regularisation, and finally connect your from-scratch network to the convolutional and transformer architectures used today.

Each step comes with small calculations you can check by hand and short Python examples that use only basic arrays (NumPy). By the end, nothing in a neural network should feel mysterious.

How the book is organised

Exercises and a glossary close the book.

Chapter 1What a Neural Network Is

A neural network is a function that turns inputs into outputs through layers of simple computations, with many adjustable numbers called weights. Training finds weights that make the outputs match examples.

The recipe

  1. Forward pass: compute outputs from inputs.
  2. Loss: measure how wrong the outputs are.
  3. Backward pass: compute how each weight affects the loss.
  4. Update: adjust each weight slightly to reduce the loss.
  5. Repeat over many examples.

Why "neural"?

The name comes from a loose analogy with brain cells that receive signals and fire. Modern networks owe little to biology; they are better understood as flexible mathematical functions.

You have reached the end of the free sample.
The full book continues with 41 more chapters, plus the appendices.

Get the full book