Hub

Neural Net Playground

Epoch 0
Loss -
The network
Loss over time
Activation

How to play

  1. Pick Red dot or Blue dot, then tap the plot.
  2. Press Play and watch the colours settle.
  3. Try a preset, or change the layers and neurons.
Do thisPhoneKeyboard
Add a dotTap the plotArrows, then Enter
Remove a dotTap the dotEnter on it
Swap colourRed / BlueC
Play / PausePlayP
One stepStepN
New random startResetR

What's happening?

  • Each neuron adds up its inputs, each times a weight, then squashes the total.
  • At first the weights are random, so the guesses are random too.
  • The loss is a score for how wrong the guesses are. Lower is better.
  • Each epoch, the net nudges every weight a little in the direction that lowers the loss. That's backpropagation.
  • The soft background is the net's guess for every spot. The bright line is where it flips from red to blue.
  • One neuron can only draw a straight line. Stacking neurons lets the net bend lines into curves.

Try this: load Spiral, set 1 layer of 2 neurons and press Play. Stuck? Now add layers and neurons until it wins.