darkflow icon indicating copy to clipboard operation
darkflow copied to clipboard

loss won't decrease

Open mohamedBenHachme opened this issue 4 years ago • 4 comments

Hey I hope everyone is doing well, first I wanna say thank you for everyone who helped to dilever such great project. I have succefully installed darkflow in my machine, I have prepared my own dataset (74 images/annotatins files), downloaded pre-trained weights and cfg of tiny-yolo, I have followed the steps and change what needs to be changed in the cfg file. My problem is that After training my model and reaching 6500 steps, the loss becomes constant it goes from a range of 0.60 to 0.80, after testing the trained model it detects objects but with poor accuracy (max confidence is 0.1135392). Can anyone help or suggest a solution to increase the model accuracy, thank you.

mohamedBenHachme avatar Apr 05 '20 15:04 mohamedBenHachme

@mohamedBenHachme

I tried to fix this problem by varying lr periodically (as explained in th link below), specially when it stays unchanged for a while. also how sometimes it needs to be patient and higher iterations solves it.

https://blog.paperspace.com/intro-to-optimization-in-deep-learning-gradient-descent/

mfaramarzi avatar Apr 15 '20 20:04 mfaramarzi

I have a similar problem. Any change from trying what @mfaramarzi said @mohamedBenHachme ?

GarlandZhang avatar May 16 '20 19:05 GarlandZhang

@mfaramarzi @GarlandZhang the problem was that the model needed more steps, so I added another batch of training data and kept training the model until I reached 40000 step and I got predictions even if the loss didn't decrease.

mohamedBenHachme avatar May 16 '20 19:05 mohamedBenHachme

oh nice! what was your accuracy for the model you were creating? also what was your cfg setup like?

edit: Also apparently the training optimizer algorithm already changes the learning rate.

GarlandZhang avatar May 16 '20 20:05 GarlandZhang