Deep learning
Frame the two-layer XOR network experiment
Page 1 sets a falsifiable claim for the two-layer XOR network before any implementation work begins.
1Try it yourself
Playground
Layer stack
Deep nets stack features: Edges → Shapes → Objects. Freeze early layers and watch later ones adapt.
- EdgesLow-level lines & contrast
- ShapesCorners, blobs, parts
- ObjectsCats, signs, faces
2Learn the idea
Read
Name the deliverable and claim
Success is not “I followed the tutorial.” Success is producing evidence that: two-layer net reaches XOR solutions that a single neuron cannot. The accepted input is narrow on purpose: XOR truth table, hidden width, learning rate, epochs. That narrowness is what lets you inspect every field and prevents a toy demo from being narrated as a production system.
Record the baseline you must beat: single-neuron XOR attempt recorded as failing. If the finished artifact cannot beat that baseline on the fixture below, stop and revise the claim before writing more code.
Read
Inventory the fixture
cases=[((0,0),0),((0,1),1),((1,0),1),((1,1),0)]
print('XOR examples',len(cases))
Expected evidence: dead or dimensionally broken network. Treat the printout as a claim about this fixture, not as proof that the toolchain merely started.
Read
Spot misleading success early
For the two-layer XOR network, a decorative win often looks like a clean run that never checks all four XOR cases correct after training; single-neuron baseline fails. Write the metric down now so later pages cannot redefine success after the fact. Also note the operational threat you will eventually gate on: scaling the toy net's accuracy language to production vision claims.
Read
Lab notebook: claim before code
For deep-learning-basics, write the claim on a sticky note in this exact shape: “Given XOR truth table, hidden width, learning rate, epochs, the two-layer XOR network will …”. Fill the ellipsis with the observable part of: two-layer net reaches XOR solutions that a single neuron cannot. Tape the baseline beside it: single-neuron XOR attempt recorded as failing. If someone later replaces your metric with a vibe check, the sticky note is how you push back.
Also sketch the one-sentence user story: a person uses this output to show why a hidden layer is required for XOR while keeping the net tiny. If that sentence needs a dashboard, a model zoo, or five services, the lab scope is too wide—shrink the fixture (XOR four-row table) until the story fits on one screen.
Read
Worked judgment
Decide now whether live network calls are allowed on page 1. For this lab they usually are not; inventory and contracts should run offline against XOR four-row table. Note the metric you will eventually require (all four XOR cases correct after training; single-neuron baseline fails) so page 4 cannot invent a softer target. The characteristic failure to keep in mind is vanishing updates from saturated activations, or reporting train accuracy only.
Read
Why this stage matters for the two-layer XOR network
At the experiment brief stage for deep-learning-basics, the job is narrower than finishing a product demo. You are creating one progressive evidence piece about XOR four-row table that later pages inherit without redefining success. Keep that fixture small enough to inspect by hand, keep outputs copy-pasteable as text, and refuse to narrate this baseline as if it were a production SLA: single-neuron XOR attempt recorded as failing.
For this page specifically, success looks like a falsifiable claim and baseline written before coding while still centering the user decision to show why a hidden layer is required for XOR while keeping the net tiny. If you cannot point to a file, command, or assertion that proves that for the two-layer XOR network, stay on this page instead of advancing.
Go deeper
Before you start
Why this matters
On paper, write the user decision this lab supports: show why a hidden layer is required for XOR while keeping the net tiny. Then write one sentence naming what could look successful while actually being wrong for this claim—focus on vanishing updates from saturated activations, or reporting train accuracy only. Keep both sentences beside the fixture inventory you run next.
Related lessons
Check your understanding
Page assessment
Answer from memory. Completion is saved from this evidence, not from opening the next page.
All responses are required.