Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 641 Bytes

README.md

File metadata and controls

42 lines (34 loc) · 641 Bytes

MNIST-LibTorch

An example of MNIST handwritten number recognition for LibTorch written by pure CPP

Quick start

download code

$ git clone https://github.com/Lornatang/MNIST-LibTorch.git
$ cd MNIST-LibTorch
$ mkdir build
$ cd build
$ cmake ..
$ make

Download dataset

$ cd <repo>/data
$ bash download.sh

Train

$ cd <repo>/build
$ ./train ../data

Inference

$ cd <repo>/build
$ ./test ../data

Detect image

$ cd <repo>/build
$ ./detect ../data/image.png ../checkpoint/model_best.pth

Thanks

Thank my parents for their great support for my work!