Lesson 7.2ModelCode~50 min
Layers & networks
Why one neuron can’t solve XOR, and how a layer of them can.
Module 7 · 0/11 done
The problem one neuron can’t solve
XOR (“exclusive or”) outputs 1 when exactly one of its two inputs is 1. Plot the four cases, and you’ll notice something awkward: the amber points sit on opposite corners. No single straight line can put both amber points on one side and both blue on the other.
| x₁ | x₂ | XOR |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Check yourself
Since one neuron draws one straight line, can a single neuron learn XOR?
Complete the challenge above to continue.