Gradient
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
000
011
101
110
?
Fig 7.2XOR: the answer is 1 when the inputs differ. Try to imagine one straight line separating amber from blue — it can’t be done.
Check yourself
Since one neuron draws one straight line, can a single neuron learn XOR?

Complete the challenge above to continue.