see http://takatakamanbou.hatenablog.com/entry/2016/03/07/221032
- ex160307.py using caffe.Classifier
- ex160307b.py using caffe.Net
- mnist.py is in https://gist.github.com/takatakamanbou/35d12aaa81b91d8d7e2c
%run ex160307.py
# fnModel = lenet.prototxt
# fnTrained = lenet_iter_10000.caffemodel
# conv1 (20, 1, 5, 5) (20,)
# conv2 (50, 20, 5, 5) (50,)
# ip1 (500, 800) (500,)
# ip2 (10, 500) (10,)
# useGPU = True
# X.shape = (10000, 28, 28, 1)
# recognition rate = 0.9902
# time = 4.34732294083
%run ex160307.py
# useGPU = False
# time = 7.81033301353
%run ex160307b.py
# useGPU = True
# time = 0.200743913651
%run ex160307b.py
# useGPU = False
# time = 4.46612715721