Two hidden units make XOR learnable: they re-describe the input so that one straight line is enough for the output unit. Watch the error sit on a plateau and then drop; afterwards read the hidden columns of the Test table to see what each hidden unit has become. Then set the seed to 1 and reset the weights: from that starting point the same network gets stuck.
Network
2 input units → 2 hidden → 1 output unit · 9 weights to learn, biases included.
A line is a weight: the thicker, the stronger; solid excites, dashed inhibits. A unit fills up as it becomes active;
the square marked 1 is the bias, always on. Point at a unit, or click it, to read its weights.
All weights as a Hinton diagram
Training
4 patterns.
One epoch shows the network each of them once; after every pattern the weights move a little in the direction that would have made the error smaller.
How big each correction is.
How much of the previous correction is repeated.
How many each time you press Train.
Picks the random starting weights.
start
Test
the training patterns
Each row is one pattern: what went in, what every hidden unit did with it, and what came out. An answer counts as right (✓) when every output is within 0.5 of its target.
Click a row to see it in the network diagram.