Skip to content

Files

Latest commit

b2bb70a · Mar 11, 2020

History

History
This branch is up to date with kayaleitner/FPGA_MNIST:master.

net

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 3, 2020
Mar 11, 2020
Mar 10, 2020
Mar 8, 2020
Mar 4, 2020
Mar 8, 2020
Mar 6, 2020
Feb 9, 2020
Mar 6, 2020
Jan 22, 2020
Mar 10, 2020
Mar 9, 2020
Mar 7, 2020
Mar 3, 2020
Mar 4, 2020
Mar 7, 2020
Mar 11, 2020
Mar 4, 2020
Mar 8, 2020
Feb 9, 2020
Mar 9, 2020
Mar 9, 2020
Mar 10, 2020

README.md

Neural Network Training

Machine Learning

The training can be done with either Pytorch or Keras, but Pytorch is recommended because of the unreliable API of Tensorflow (the foundation of Keras)

Build and Requirements

Make sure you install all requirements:

pip install -r requirements.txt

Additionally for verification (we don't trust Tensorflow/Keras/Pytorch blindly) the Neural Network Extension package must be installed. The source code is in the python folder (from the repository root). There are also precompiled python wheels on Github available.

To train the network simply run in a terminal:

python train_torch.py
python quantize.py

or use the Jupyter notebook to train the network.

Training

Training, loss

Training, accuracy

Results

For quantisation fixed point quantisation has been used.

Network Accuracy
Float 0.9832
Fake Quant 0.9832
Quant: 0.9349

Confusion matrix, full precision

Confusion matrix, quantized