How a simple neural network learns XOR
Train a 2 → 4 → 1 neural network, inspect its 17 learned parameters, and follow a prediction through every multiplication, bias, and sigmoid calculation.
Network map
17 parameters
Every connection and bias
x₁ weights
x₂ weights
bias
8 input weights+4 hidden biases+
4 output weights+1 output bias= 17
Training results
Did the network learn XOR?
—final loss
Forward pass
Run inputs through the trained model
XOR
Choose two inputs and run the model.