0

I'm learning to use the deep learning framework Chainer, and I'm in trouble training a GoogLeNet on ImageNet.

I use the given example and call it using:

python2 train_imagenet.py
    --arch googlenet
    --batchsize 64
    --epoch 10
    --gpu 0
    --mean ~/data/imagenet/ILSVRC2012_devkit_t12/data/mean_RGB_256x256.npy
    --out output/
    --root ~/data/imagenet/dataset_sample_256x256/
    --val_batchsize 8
    ~/data/imagenet/lists/train_files_sample.txt
    ~/data/imagenet/lists/val_files_sample.txt

I use an ImageNet subset of 5000 images, each image resized in 256x256 and converted to RGB when needed.

My loss doesn't even slightly change, as shown in the log below. When I log the predicted class, it always ends up after a few iterations predicting always the same class (but this class changes when I run it again). I double-checked my dataset and everything seems fine, I use ImageNet label ids and my txt files contains pairs of path and label, one per line.

epoch       iteration   main/loss   validation/main/loss  main/accuracy validation/main/accuracy  lr        
1           100         11.0533                           0.00015625                               0.01        
2           200         11.0533                           0.00078125                               0.01        
3           300         11.0533                           0.00046875                               0.01        
5           400         11.0533                           0.0009375                                0.01        
6           500         11.0531                           0.000625                                 0.01        
7           600         11.0532                           0.00078125                               0.01        
8           700         11.0533                           0.0009375                                0.01        

As it is the code from the official repo, I guess that something is wrong with my subset. Is my preprocessing right ? Is 5000 not enough (not to reach state-of-the-art, but to actually learn something) ?

Thanks for any ideas of what can be wrong.

MeanStreet
  • 1,217
  • 1
  • 15
  • 33
  • isn't the input to googlenet 224x224, not 256x256? – c2huc2hu Jun 05 '18 at 12:46
  • You're right, but their code uses a class inherited from `chainer.dataset.DatasetMixin` for data preprocessing (scale it in 224x224, center/reduce...). The prerequisite in the file header asks to scale to 256x256, so I stuck to it – MeanStreet Jun 05 '18 at 12:59

0 Answers0