Search code examples
yolodarknet

Yolo learning rate not making sense?


So in my cfg file, I have my learning rate set up as

learning_rate=0.001
max_batches = 402000
policy=steps
steps=-1,100,2000,30000
scales=.1,10,.1,.001

which to my understanding means that it starts at 0.001, quickly changes to 0.0001, then at 100 steps changes back to 0.001, then at 2000 steps = 0.0001, then at 30000 steps it would go to 0.000001. But here I am at step

309360: 0.000222, 0.015274 avg, 0.001000 rate, 0.112701 seconds, 4949760 images

and the learning rate is still 0.001. Am I missing something? is that not how the learning rate scaling works?

this is Yolov3-tiny using Darknet.


Solution

  • As it was shown in manual by AlexeyAB, your steps = max_batches0.8, max_batches0.9. I prefer you to set your steps and scales like this: steps = 321600,361800 scales = .1,.1 Before burn_in your learning rate will be low(some times 0.000000 as you will have 10^-15). After burn_in it should become learning rate that was defined in cfg. After 321600 iterations learning rate should grow by 10% and this happens after 361800 iterations.