By Michael Nielsen, November 2017. Written to accompany a short essay about Reduced MNIST (RMNIST).
Written for Python 2.7.
This is throwaway research code: I don't intend to expand or fix or maintain it. I'm sharing it in case you want to follow along with the detailed code in the essay linked above. That said, notification of egregious bugs significantly affecting the output is welcome.