Checkout mnist.ir
Generate intermediate code
% onnx2cpp mnist.onnx
Optimize and compile
% /usr/bin/clang++-8 -O3 mnist.cpp -I ../../../include/ -isystem ../../../packages/eigen-eigen-323c052e1731/ -o mnist.exe
Test run
% ./mnist.exe
Run it in the loop
% python demo.mnist.py
- batch size 1
- pytorch version 1.2
- ONNX IR version 1.4
- Training colab notebook
- Watch this video