Home / Workshop / Fruit Classifier
Where it started
Fruit Classifier
A single-neuron network in pure NumPy that tells limes from lemons by weight and color. Sigmoid, backprop and gradient descent, all by hand.
Written in high school, back when OpenAI was still focused on Gym, to understand neural networks without anyone else’s library doing the thinking. It’s one neuron with two inputs, a fruit’s weight and its color (0 for green, 1 for yellow), and one output: lime or lemon.
Everything is done by hand: random weight initialization, a sigmoid forward pass, backpropagation through the sigmoid’s derivative, and gradient descent over 10,000 iterations. From the same era: a from-scratch linear regression that demonstrates gradient descent, and a reworked version of Karpathy’s min-char-rnn.
- Access
- public
- Year
- high school
- Built with
- Python, NumPy