Hi,
I am new to Caffe. I am working on a project aimed to identify 3 types of objects in an image. Hence for my classification task, I will be needing 4 types of outputs i.e. the three objects and None.
My dataset is quite small.
Training set : Total 3000 images. 1000 each of the 3 categories
Validation set: Total 3000 images. 1000 each of the 3 categories
(Note that my dataset does not contain images which have none of the three objects.)
I have to use the BVLC Alexnet pretrained model
I have been suggested 2 methods:
Method 1:
Add an extra inner product layer in the end of the model (before loss and accuracy layer) such that it gives 4 output.
Method 2:
Modify the last inner product layer (i.e. fc8). Change its parameter to 4 instead of 1000.
I have tried both the methods.
In method 2 the loss is going negative just after 20 iterations
In method 1 the loss becomes zero and the accuracy becomes 1 after 20 iterations.
In both the methods, I increased the 'lr_mult' parameter to 10 from 1 so that it learns more than other layers.
I am working in CPU Mode. And my training is very very slow. It took me 14 hours just to reach 1200 iterations.
Can anyone please tell me
1. where I am wrong in both the methods
2. Is the way I am taking my dataset correct ?
3. Which method is preferable ?
4. How should I change my hyperparameters to obtain good results.
5. Should I change deploy.prototxt file also ?
6. Is the training so slow ?
7. I have created mean image file for my own dataset and not used the pretrained model one. Is it fine ?
http://pastebin.com/0vtJfjC4 - Method 2 train_val.prototxt
http://pastebin.com/tgYfmmU7 - Solver.prototxt