Neural Network Manual Backpropagation
A single training step of a small neural network written by hand in NumPy, without TensorFlow or PyTorch, to show exactly what a framework automates.
The Challenge
One complete training step of a 2-2-1 neural network, forward pass, backpropagation and weight update, was written by hand in NumPy.
Before relying on a deep-learning framework, the goal was to compute every step of training explicitly, so that gradients, activations and learning rates are understood rather than taken on trust.
Approach
Try it: one training step, computed live
Weights, biases, input, target (1) and learning rate (0.02) are the project's own. Every number above is calculated in your browser as you step through. Loss: ½(target − output)².
Results
Working through the maths shows what frameworks automate, which helps when diagnosing problems such as vanishing gradients, poor activation choices or learning-rate sensitivity in larger models.
How it was tested
- The forward pass gives 0.9209 for the input [0.3, 0.4], and the live demo above reproduces it from the same weights, biases and learning rate.
- The demo's updated weights and biases match the values printed in the original notebook.
- One training step on one input: it shows the mechanics of training, not model performance.