Bad init, watched training: the failure, not just the theory

A real 6-hidden-layer tanh network training with plain gradient descent on two interleaved moons. Pick an init scale and press Train: watch the decision boundary, the loss curve, and the network itself, and each hidden layer's activations and gradients as histograms, live.

Three linked panels: a decision boundary heatmap over the two-moons data, a training loss curve, and either one gradient or activation histogram per hidden layer or a diagram of the network with one node per neuron and one line per weight, updating live as the network trains.
init σ 0.010 depth 6 learning rate 0.60
Full-batch gradient descent (learning rate adjustable, 0.6 by default, and changeable mid-run), width 10, tanh hidden units, sigmoid output. Every weight starts as a Gaussian sample from N(0, σ²) and every bias at 0; the Xavier button sets σ = √(2/(10+10)) ≈ 0.32, Glorot's value for a 10→10 layer. Train runs 400 steps; press it again to keep going for another 400. Network: one line per weight (orange positive, blue negative, thickness and opacity ∝ |w|), one node per neuron colored by its activation on the probe point (hover the boundary plot to move it, click to pin it there, even through Reset and Train, until the pointer leaves the plot and comes back; hover a node to pick out its point on the tanh plot), ringed red when saturated. Activations: every hidden unit's activation over all 120 training points, one panel per layer, red where the unit is saturated (|a|>0.995, so tanh′<0.01) and green where it still passes gradient. Gradients: the backprop gradient ∂L/∂a at every hidden unit for every training point, binned by log₁₀ of its magnitude on one shared axis from 10⁻⁶ to about 1 (ticks at 10⁻⁴, 10⁻², and a taller one at 1); red bars at the ends collect everything smaller than 10⁻⁶ (vanished) or larger than about 3 (exploding). Gradient flows right to left, so vanishing shows as mass sliding left toward L1. Before training starts, the top-right panel plots tanh (tanh′ in gradients mode) with every hidden unit placed at its pre-activation h: in network mode one digit per unit, its layer number, for the probe point; in the histogram modes a jittered dot for every unit on every training point. Training swaps in the loss curve and Reset brings the tanh plot back, until you pick one with the loss | tanh toggle above the panel (it works mid-training too); after that the panel stays where you put it. Too-small init: the weights are nearly invisible, activations collapse to a spike at 0, gradients shrink by orders of magnitude per layer, and loss barely moves. Too-big init: thick weights, every unit pinned at ±1, and the boundary stays close to its random start.