What is this? A neural network system I wrote from scratch that uses no object oriented techniques.

What exactly does it do? It will efficiently download the fashion-mnist database, then train a neural network (of a very ordinary common architecture), then run some validation, and finally run an example of an isolated evaluation using the model.

What dependencies are required? None. No frameworks. There are essentially no dependencies. Just Python3; it does use numpy but the thinking is that if you go to a simpler system yet, you can very easily use C-style arrays. It is a massive 15kB including a useful library for obtaining and using MNIST style data.

Why do this stupid thing? First it's an extremely useful learning exercise. Second this can be very helpful if you need to port a simple neural network classifier to an architecture which does not support an object oriented language, for example microcontrollers.

How can I get this code? It is here: https://xed.ch/project/xedNN/xedNN.tgz

What's an easy way to try it out? Including the download, try something like this (Linux natch).

wget -qO- https://xed.ch/project/xedNN/xedNN.tgz | tar -C /tmp -xvzf -
cd /tmp/xedNN

Whom did you lift the architecture from? If you like this kind of thing I very much encourage you to check out https://nnfs.io/ which I stole the architecture from. I was a proofreader for their excellent book. I built their system as I followed along and it works pretty similarly. Their system allowed me to develop a parallel system while ensuring the results didn't radically differ. At this point it's possible to deviate from their model and experiment with novel architecture ideas. I thought their pedagogy was good but I felt like the objects obscured when exactly the specific computations were performed and I wanted to unravel that. If you think decoupling this kind of OOP architecture into simple data structures is easy, well, have fun with that!

Chris X Edwards  —  2021-01-01 - 2022-05-10