Learning rate is low.
emedinac opened this issue · comments
Edgar Medina commented
Hi,
I am not sure but I tried to run the train.py and I found the initial learning rate is too low (I am not doing a fine tunning).
base_lr: 1.5625e-05
current_lr: 1.4641e-07 (used in the first 100 iterations)
However, I found the cfg file is a good fit, with 1e-3. Probably it is something related to this line:
base_lr = cfg['TRAIN']['LR'] / batch_size / subdivision
is it ok? why is the initial LR too low?
Hiroto Honda commented
Thank you. We follow the original lr and loss setting of the darknet:
- calculate loss without size averaging
https://github.com/DeNA/PyTorch_YOLOv3/blob/master/models/yolo_layer.py#L31-L32 - divide the learning rate by the batch size and the subdivision size
https://github.com/DeNA/PyTorch_YOLOv3/blob/master/train.py#L69 - perform burn-in (warm-up) scheduling
https://github.com/DeNA/PyTorch_YOLOv3/blob/master/train.py#L75-L77
The lr setting above is important for reproducing the performance of the darknet.