The science
Network: input x in R^2, two tanh hidden layers of H units, one sigmoid output.
a1 = tanh(W1 x + b1)
a2 = tanh(W2 a1 + b2)
z = w3 . a2 + b3, p = sigmoid(z)
L = mean_i [ softplus(z_i) - y_i z_i ] (binary cross-entropy)
Backpropagation applies the chain rule layer by layer: dL/dz_i = (p_i - y_i)/n, then delta2 = (w3 dL/dz) * (1 - a2^2), delta1 = (W2^T delta2) * (1 - a1^2), and weight gradients are outer products of deltas and the previous activations.
Independent check: central finite differences, dL/dtheta_j ~ (L(theta_j+e) - L(theta_j-e)) / 2e with e = 1e-5, compared with the backprop gradient on about 48 evenly spread weights. It uses only forward passes of the loss, so a bug in the backward code shows up as a large difference. It is a gradient check, not a proof the network generalises.
Optimiser: Adam (beta1 0.9, beta2 0.999), full batch of 200 points, no regularisation, no test split. The accuracy shown is training accuracy only, so a spiral fit with 16 units can look perfect while overfitting noise. Weights start from Xavier-style Gaussians with a fixed seed, so presets are repeatable. Datasets are synthetic and generated in the page.