Neural nets by building
Ship and explain the single-neuron trainer
Page 8 packages proved vs unproved evidence so another engineer can run, trust, or reject the single-neuron logic-gate trainer.
1Learn the idea
Read
Assemble the ship record
A shippable lab artifact includes: how to run it, the metric result (final predictions match gate table; loss decreases across epochs), the failure you can still reproduce (learning rate so large weights diverge, or claiming XOR success with one neuron), the security gate for hard-coding 'trained' weights without a verifiable training loop, and a rollback note. The user decision it supports remains: learn weights for a linearly separable gate by gradient steps you can print.
Read
Freeze the evidence
cases=[((0,0),0.13),((0,1),0.91),((1,0),0.91),((1,1),1.0)]
assert [int(p>=.5) for _,p in cases]==[0,1,1,1]
print('OR gate shipped',cases)
Expected evidence: stage evidence for mastery ship. Store this beside the fixture version so scores remain meaningful after content changes in neural-nets-by-building.
Read
Explain limits without apology
State operating limits for the single-neuron trainer in plain language: fixture size, offline vs live dependencies, and what would require a new eval set. Shipping neural-nets-by-building is honest scoping, not maximal confidence language.
Read
Lab notebook: proved vs unproved
Fill this table in your notes for the single-neuron trainer:
- Proved on
AND gate truth table: … - Unproved beyond the fixture: …
- Metric that blocks release: final predictions match gate table; loss decreases across epochs
- Failure still reproducible: learning rate so large weights diverge, or claiming XOR success with one neuron
- Security gate: hard-coding 'trained' weights without a verifiable training loop
- Rollback: …
Ship the narrative only when the unproved list is honest. Reviewers trust narrow claims that support learn weights for a linearly separable gate by gradient steps you can print more than maximal language that collapses under the first production oddity.
Read
Worked judgment
Hand your ship note to a peer and ask them to recreate a proved/unproved ship note with rollback without watching you type. If they cannot, your evidence is still tribal knowledge. Tighten the run command and the metric line until a stranger can validate the single-neuron trainer against AND gate truth table.
Read
Why this stage matters for the single-neuron trainer
At the mastery and shipping stage for neural-nets-by-building, the job is narrower than finishing a product demo. You are creating one progressive evidence piece about AND gate truth 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: untrained weight predictions on the gate table.
For this page specifically, success looks like a proved/unproved ship note with rollback while still centering the user decision to learn weights for a linearly separable gate by gradient steps you can print. If you cannot point to a file, command, or assertion that proves that for the single-neuron trainer, stay on this page instead of advancing.
Go deeper
Before you start
Why this matters
List two things this chapter proved on the fixture and two things it did not prove about the single-neuron trainer. If you cannot name the gaps, you are not ready to ship the narrative—even if the code runs.
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.