Interactive Simulator · Deep Learning Education

Neural Network: Draw → Process → Recognize

Architecture: 784 (28×28 px) → 643210 (digits 0–9)  ·  Parameters: 784×64+64 + 64×32+32 + 32×10+10 = 52,650

Controls

Initializing — training model in your browser…

Draw a digit 28×28 input grid

Draw with mouse or touch. Input is downsampled to 28×28 and centered, like MNIST.

Network predictions

Network structure live activations · blue = +w · red = −w

Neuron brightness = activation strength. A subset of hidden neurons is shown; connections are sampled for clarity.

One neuron, by hand

a = f(w₁x₁ + w₂x₂ + b)

Interactive neuron

Activation function comparison active in amber · current point marked

Note on softmax: it acts on a whole layer, not one neuron. For a two-way choice between z and 0, softmax reduces exactly to the sigmoid — that curve is what is plotted.

Focus on individual neurons

Select a neuron to see what pattern it has learned to detect

Selected neuron stats

Click a neuron in the grid to inspect it.

Response to current input

Draw a digit on tab 01 and press “Process network”.

Compare: your input vs. learned pattern

Current input (none yet)
Learned pattern — amber excites, blue inhibits. Deeper layers are linear projections back through earlier layers.

Layer 1: edge detection click any neuron

Border glow shows how strongly each neuron fires for the current input — process a drawing on tab 01, then come back here.

Complete backpropagation process demo net 4 → 5 → 4 → 3 · trained on the real Iris dataset (150 flowers, 3 species)

1 · cost C = (1/n) Σₖ [ −Σᵢ yᵢ ln aᵢ⁽ᴸ⁾ ]ₖ (mean cross-entropy over the training set)
2 · output error δ⁽ᴸ⁾ = a⁽ᴸ⁾ − y (elegant result of softmax + cross-entropy)
3 · hidden error δ⁽ˡ⁾ = ((W⁽ˡ⁺¹⁾)ᵀ δ⁽ˡ⁺¹⁾) ⊙ σ′(z⁽ˡ⁾) where σ′(z) = a(1−a)
4 · weight update W⁽ˡ⁾ ← W⁽ˡ⁾ − η · (1/n) Σₖ δ⁽ˡ⁾ (a⁽ˡ⁻¹⁾)ᵀ
5 · bias update b⁽ˡ⁾ ← b⁽ˡ⁾ − η · (1/n) Σₖ δ⁽ˡ⁾

Current flower shown live in the network

Training progress

Cost C (dataset)
Gradient norm ‖∇C‖
Iteration0
Dataset accuracy
This flower → prediction
Target confidence
forward only — no training yet

Numerical example one real weight, this flower

Press “Start backpropagation” to trace one weight.

Interactive backpropagation network with live values click any neuron

Inputs are the four measurements, min–max normalized to 0–1. Number in each neuron = activation a. Red value below = error δ for the current flower after backprop. Amber ring = target species. Edge color/width = weight sign and size. Click a neuron to pin its incoming weights.

Cost function landscape mean Iris cost over two weights

Mean cross-entropy over a 30-flower stratified sample, computed by actually sweeping the two strongest weights into the target species neuron. Amber dots = gradient descent path.

Optimization path dataset cost vs iteration

Model is trained live in your browser on procedurally generated digit glyphs (multiple fonts, shifts, scales, rotations), then normalized MNIST-style. No data leaves this page.