Hardware Oriented CNN for MNIST recognition.
You can try an online simulation of our CIM macro!
python3 ./train.py --output-path=./models/mnist_base.pth
python3 ./quantize.py --model-path=./models/mnist_base.pth --output-path=./models/mnist_quantized.pth
python3 ./convert.py --model-path=./models/mnist_quantized.pth --output-path=./models/mnist_quantized_converted.pth
python3 ./display_weights.py --model-path=./models/mnist_quantized_converted.pth --chip-format
python3 ./test.py --test-base --model-path=./models/mnist_base.pth # Accuracy: 97.56%
python3 ./test.py --model-path=./models/mnist_quantized_converted.pth # Accuracy: 90.57%
python3 ./test.py --test-hardware --model-path=./models/mnist_hacc --serial-port=/dev/ttyUSB2 # Accuracy: 91.89%
python3 ./demo.py --model-path=./models/mnist_quantized_converted.pth --live
python3 ./demo.py --hardware --model-path=./models/mnist_hacc --serial-port=/dev/ttyUSB2 --live