🧠 How a Neural Network Learns

A tiny 2‑layer network learning to fit four points β€” watch the weights update in real time

Input neuron Hidden neuron Output neuron Positive weight Negative weight
0.50
πŸ“‰ Loss over time
Current Loss β€” Epoch 0
What's happening? The network takes two inputs x₁, xβ‚‚, passes them through a hidden layer with ReLU activation, and produces one output Ε·. We're training it to match four target points (a simple regression task). Each Train Step computes the error (MSE loss), then uses backpropagation to nudge every weight in the direction that reduces the error. The learning rate controls how big those nudges are. Watch the weights change color and thickness β€” and see the loss curve drop!