Neural Network Playground

Neural networks, built from scratch. Change a network's architecture, train it on sample datasets, and see how it learns. It is trained by my C++ autograd engine, compiled to WebAssembly and running in your browser. How it works.

Training dashboard

Opposite corners share a class. No straight line separates them.

  • Class 0 (circle)
  • Class 1 (diamond)
Status
Starting the training engine…
Step
0
Loss
—
Train accuracy
—
Test accuracy
—
Gradient norm
—

Loss

learning rate 0.5 · step 0
  • Training
  • Test (held out)

The loss curve appears once training starts.

Network editor

Hidden layers
1
Layer 1 neurons
8

Activation

Optimizer

Switching optimizer picks a learning rate that suits it, and starts training over.

The same seed always gives the same starting weights. Whole numbers from 0 to 999,999.

Engine: starting…

Network weights

  • Positive weight
  • Negative weight (dashed)
  • Thicker = larger · neuron shading = bias
Layer details

Waiting for the network…

Autograd inspector

One neuron: a = ReLU(w · x + b). Step forward to compute it, then backward to see how the engine finds how much a changes when x, w or b change.

Waiting for the engine…