caffe icon indicating copy to clipboard operation
caffe copied to clipboard

about how to train ssd

Open peaceorwell opened this issue 10 years ago • 10 comments

I trained the ssd300,but the result only reach 55%~,can you explain the details about how you train the final model?

peaceorwell avatar Jul 12 '16 01:07 peaceorwell

What have you changed? Can you provide more details?

weiliu89 avatar Jul 12 '16 13:07 weiliu89

only the batchsize,change it to 2.......

peaceorwell avatar Jul 15 '16 07:07 peaceorwell

Do you change both lines to 2? If so, you would like to increase your training iterations proportionally. Besides, probably you should adjust your learning rate a bit as well.

weiliu89 avatar Jul 15 '16 14:07 weiliu89

ok,thank you! I'll have a try.

peaceorwell avatar Jul 18 '16 06:07 peaceorwell

I set a batch_size of 4

and add this to ssd_pascal.py, because the post in BVLC#430 (comment)

#if batch_size is divided by X then max_iter and stepsize should multiply by X
max_iter = 60000 * (32 / batch_size)
stepsize = 40000 * (32 / batch_size)

conner99 avatar Aug 02 '16 11:08 conner99

Actually, the accum_batch_size defined in here has solved your problem. You could change batch_size to 4 and keep accum_batch_size to 32.

weiliu89 avatar Aug 02 '16 14:08 weiliu89

Thank you for the clue and the great work!

conner99 avatar Aug 03 '16 08:08 conner99

Hi, what is the stepsize parameter during training?

abhisheksgumadi avatar Aug 24 '16 11:08 abhisheksgumadi

It should be the same if you don't change accum_batch_size.

weiliu89 avatar Aug 25 '16 06:08 weiliu89

Thanks Wei, just to clarify did you mean it should have the same value as accum_batch_size?

abhisheksgumadi avatar Aug 25 '16 11:08 abhisheksgumadi