Skip to content

A feedforward neural network made in python for recognizing hand-written digits in the MNIST dataset.

Notifications You must be signed in to change notification settings

veetimar/neural-network-python

Repository files navigation

CI codecov

About

A fully connected neural network, ELU activation in hidden layers and sigmoid in output layer. Comes with a simple user interface for training and testing the neural net with MNIST hand-written digits but can be used for practically any task since the size of the neural net and batch size can be freely choosed. Is able to achieve over 97% accuracy in the MNIST dataset with just a few minutes of training.

How to use

The easy way (Docker installed)

docker run -itv parameters:/workdir/parameters veetimar/neural-network

Note that matplotlib seems not to work inside a container so plotting error after training and showing images classified wrong/right do not work when using Docker.

The hard way (Poetry and Python installed)

Clone the repository

git clone https://github.com/veetimar/neural-network-python

Install the required dependencies with

poetry install --without dev

If you wish to use the neural network for something else than the included UI you can run

poetry install --without dev,run

instead.

To run the digits recognition UI:

poetry run python src/digits.py

Docstrings in the code should give a clear enough view on how the network class can be used in you own code. Mainly look at "forward" and "train" methods.

About

A feedforward neural network made in python for recognizing hand-written digits in the MNIST dataset.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors