You may see that it's hard to find any document about how to use the trained model of MNIST in caffe project. If this script helps you, pls give us a star or msg, thanks!
python2 mnist_test.py 2.png
(jpg also works)
Result:
- written in python 2
- you may want to change
Caffe_Root
in mnist_test.py if you installed somewhere else - the test is running on GPU by default, you can change
caffe.set_mode_gpu()
tocaffe.set_mode_cpu()
if necessary
2017
by 9crk & SunnyBingoMe