When computers see
Debug overfitting to one plus orientation in the 3x3 plus-sign classifier
Page 5 reproduces and repairs the characteristic failure of the 3×3 plus-sign image classifier: overfitting to one plus orientation, or leaking test grids into template design.
1Learn the idea
Read
Reproduce before you repair
Do not start with a speculative fix for the 3x3 plus-sign classifier. Force the failure on purpose, save the before output, then change one cause at a time. Retries are allowed only for transient conditions—not for bad input that will fail forever on computer-sees.
Read
Force the failure
img=[[0,1,0],[1,1,1],[0,1,0]]
for i in range(9):
copy=[r[:] for r in img]; copy[i//3][i%3]^=1
score=sum(copy[r][c] for r,c in [(0,1),(1,0),(1,1),(1,2),(2,1)])
print(i,score>=4)
Expected evidence: nine booleans showing which flips remain plus. If you cannot reproduce on demand, you do not yet control the failure mode for computer-sees.
Read
Repair with a reviewable diff
After repair, rerun the exact reproduction command. Keep the failing fixture as a regression seed for the observability page. For the 3×3 plus-sign image classifier, remember the claim you are restoring: plus fixtures score positive; blank/noise fixtures do not.
Read
Lab notebook: reproduce on command
Store a one-command reproduction for: overfitting to one plus orientation, or leaking test grids into template design. The command should use plus, blank, and distractor 3×3 grids or a minimal mutant of it. Paste the failing output into notes/failure-before.txt (or your shell scrollback as copied text). After the fix, paste notes/failure-after.txt and keep both.
Retries belong only on transient faults. If the failure is bad input, a bad allowlist, or a logic bug in the 3x3 plus-sign classifier, retrying will amplify cost without repairing trust around classify tiny binary images as plus vs not-plus with inspectable features.
Read
Worked judgment
Classify the failure as prevent, detect, contain, or recover—using this lab’s language, not a generic poster. For computer-sees, the first fix should usually be detect+prevent at the boundary, because overfitting to one plus orientation, or leaking test grids into template design is cheaper to stop early than to explain in production prose.
Read
Why this stage matters for the 3x3 plus-sign classifier
At the debugging stage for computer-sees, the job is narrower than finishing a product demo. You are creating one progressive evidence piece about plus, blank, and distractor 3×3 grids 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: pixel-sum threshold accuracy on the same four images.
For this page specifically, success looks like before/after evidence for the characteristic failure while still centering the user decision to classify tiny binary images as plus vs not-plus with inspectable features. If you cannot point to a file, command, or assertion that proves that for the 3x3 plus-sign classifier, stay on this page instead of advancing.
Glossary: computer vision · Glossary: convolutional neural network
Go deeper
Before you start
Why this matters
Describe the smallest fixture that triggers overfitting to one plus orientation. Predict the first visible symptom (exception, wrong label, silent empty success). You will compare that prediction with the reproduction below.
In the wild
See how this idea shows up as a product and a company — then come back to the lesson. Skills transfer across vendors.
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.