tfyolo icon indicating copy to clipboard operation
tfyolo copied to clipboard

Learning rate scheduler not updated in train_step

Open Darkhunter9 opened this issue 3 years ago • 1 comments

My tensorflow version is 2.1.0. I found that when calling step() of the learning rate scheduler, lr is not updated (the scheduler works fine when tested individually). I guess it has something to do with distributed strategy run process. The problem is fixed if moving the learning rate updating process to the main loop, instead of in training step function.

https://github.com/LongxingTan/Yolov5/blob/88acfd988decc4cc78335cfb6eb50f1975294c1f/yolo/train.py#L122

Darkhunter9 avatar Jun 22 '21 23:06 Darkhunter9

Hi @Darkhunter9 , Thanks for your carefully check about the code. you found so many bug and kindly give solutions, I will check that. Thanks

LongxingTan avatar Jun 23 '21 01:06 LongxingTan