In Chapter 1 of the book, we introduced computer vision and machine learning, explaining in details how neural networks work. In this directory, we provide an implementation from scratch, applying our simple network to a historical classification task.
(Reminder: Notebooks are better visualized with nbviewer
: click here to continue on nbviewer.jupyter.org
.)
- 1.1 - Building and Training a Neural Network from Scratch
- Implement a simple neural network, from the modelling of an artificial neuron to a multi-layered system which can be trained to classify images of hand-written digits.
- neuron.py: model of an artificial neuron able to forward information (code presented in notebook 1.1).
- fully_connected_layer.py: implementation of a functional layer grouping several neurons, with methods to optimize its parameters (code presented in notebook 1.1).
- simple_network.py: class wrapping everything together into a modular neural network model which can be trained and used for various tasks (code presented in notebook 1.1).