I have tested your code and I have not reproduced your problem. I trained LeNet on MNIST according to this tutorial
http://caffe.berkeleyvision.org/gathered/examples/mnist.html for 5000 iterations (~99% accuracy). All tests passed so that's probably a problem with your platform: libraries, environment or hardware. I don't know sorry, I'm quite new here.
Beside this, The prediction accuracy is surprisingly low, around 8% (lower than random!). I have noticed most of the output are nearly of the same class: 2 or 3, sometimes the other ones. That's why I wanted to try with Classifier, set raw_scale = 255 instead but I have an other problem yet* (that I'm actually trying to solve).
*Traceback (most recent call last):
File "classify_mnist.py", line 26, in <module>
out = net.predict([ image ])
File "/mnt/Softwares/caffe/python/caffe/classifier.py", line 86, in predict
out = self.forward_all(**{self.inputs[0]: caffe_in})
File "/mnt/Softwares/caffe/python/caffe/pycaffe.py", line 150, in _Net_forward_all
outs = self.forward(blobs=blobs, **batch)
File "/mnt/Softwares/caffe/python/caffe/pycaffe.py", line 80, in _Net_forward
self.blobs[in_].data[...] = blob
ValueError: could not broadcast input array from shape (64,28,28,28) into shape (64,1,28,28)