MNIST example with images from IMAGE_DATA and no other changes fails to train

39 views
Skip to first unread message

Pastafarianist

unread,
Apr 13, 2015, 2:13:33 PM4/13/15
to caffe...@googlegroups.com
Hi guys,
I'm trying to train a standard LeNet on MNIST with images loaded from IMAGE_DATA, not DATA (that's because I actually need to train it on smaller digits, about 15x15px, so I want to make sure that it works correctly before plugging in new_width and new_height). Unfortunately, it doesn't work as expected. Training loss rapidly becomes about 10^-9 while testing loss is in the range of 50-60. These would be the perfect signs of overfitting if it wasn't for the fact that this is the exact same LeNet as in the tutorials. Here's the code:


I would *guess* that caffe trains the network on only one batch, which is 100 images but I have no idea how to check that. Could somebody help?

Pastafarianist

unread,
Apr 13, 2015, 5:34:34 PM4/13/15
to caffe...@googlegroups.com
I confirm that if I replace IMAGE_DATA layers with DATA and an lmdb database generated from the same directory with images, everything works perfectly. The problem is definitely somewhere within IMAGE_DATA.

Reply all
Reply to author
Forward
0 new messages