Search code examples
deep-learningobject-detectionyolodarknetlearning-rate

Darknet yolo v4 - how to get current learning rate?


When I train yolo v4 with Darknet, few times a second I get a list of variables. Is there an easy way to make Darknet binary also print learning rate? If everything fails I will make changes in https://github.com/AlexeyAB/darknet/blob/master/src/detector.c and rebuild, but I'd really prefer to avoid maintaining a custom darknet version.

./darknet detector train data/obj.data ../yolov4-custom.cfg yolov4.conv.137 -dont_show -map &> logs.txt & disown
v3 (iou loss, Normalizer: (iou: 0.07, cls: 1.00) Region 139 Avg (IOU: 0.000000, GIOU: 0.000000), Class: 1.000000, Obj: 0.000000, No Obj: 0.000000, .5R: 0.000000, .75R: 0.000000, count: 1, class_loss = 0.500000, iou_loss = 0.000000, total_loss = 0.500000 
v3 (iou loss, Normalizer: (iou: 0.07, cls: 1.00) Region 150 Avg (IOU: 0.394489, GIOU: 0.289983), Class: 0.985003, Obj: 0.004027, No Obj: 0.000896, .5R: 0.000000, .75R: 0.000000, count: 6, class_loss = 3.253636, iou_loss = 0.891068, total_loss = 4.144704 
v3 (iou loss, Normalizer: (iou: 0.07, cls: 1.00) Region 161 Avg (IOU: 0.612244, GIOU: 0.555591), Class: 0.897004, Obj: 0.014743, No Obj: 0.000339, .5R: 1.000000, .75R: 0.000000, count: 1, class_loss = 0.492179, iou_loss = 0.095293, total_loss = 0.587472 

Solution

  • The learning rate can be found in your logs.txt file

    Refer to this answer for more information.