# micromlp: A From-Scratch Neural Net That Predicts Housing Prices

> Source: <https://julin.ai/2026/08/29/micromlp/>
> Published: 2026-08-28 12:00:00+00:00

I built [micromlp](https://gist.github.com/soasme/913a4ab4c554d7874695450d5cd56e97): a single file of Python, no dependencies, no PyTorch. It downloads a real dataset, builds a 2-layer MLP, implements automatic differentiation from scratch, trains with gradient descent, and makes predictions. The task: the California housing dataset from chapter 2 of [Hands-On Machine Learning](https://www.oreilly.com/library/view/hands-on-machine-learning/9781098125967/) — predict a district’s median house value from its census stats.

This is inspired by [Karpathy’s microgpt](https://karpathy.github.io/2026/02/12/microgpt/). I’ve used PyTorch for years. I’d never actually written backprop by hand. There’s a difference between knowing `.backward()`

exists and knowing what it does when you call it — I found it worth closing that gap once, on a toy, instead of taking it on faith forever.
