Skip to content

Commit b5ff7f4

Browse files
committed
Save weights for each 1000 iterations if max_batches < 10000
1 parent 1b936ab commit b5ff7f4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
Paper YOLO v4: https://arxiv.org/abs/2004.10934
66

7-
Paper Scaled YOLO v4: https://arxiv.org/abs/2011.08036 use to reproduce results: https://github.com/WongKinYiu/ScaledYOLOv4
7+
Paper Scaled YOLO v4: https://arxiv.org/abs/2011.08036 use to reproduce results: [ScaledYOLOv4](https://github.com/WongKinYiu/ScaledYOLOv4)
88

9-
More details: [medium link_Scaled_YOLOv4](https://alexeyab84.medium.com/scaled-yolo-v4-is-the-best-neural-network-for-object-detection-on-ms-coco-dataset-39dfa22fa982?source=friends_link&sk=c8553bfed861b1a7932f739d26f487c8) and [medium link_YOLOv4](https://medium.com/@alexeyab84/yolov4-the-most-accurate-real-time-neural-network-on-ms-coco-dataset-73adfd3602fe?source=friends_link&sk=6039748846bbcf1d960c3061542591d7)
9+
More details in articles on medium:
10+
* [Scaled_YOLOv4](https://alexeyab84.medium.com/scaled-yolo-v4-is-the-best-neural-network-for-object-detection-on-ms-coco-dataset-39dfa22fa982?source=friends_link&sk=c8553bfed861b1a7932f739d26f487c8)
11+
* [YOLOv4](https://medium.com/@alexeyab84/yolov4-the-most-accurate-real-time-neural-network-on-ms-coco-dataset-73adfd3602fe?source=friends_link&sk=6039748846bbcf1d960c3061542591d7)
1012

1113
Manual: https://github.com/AlexeyAB/darknet/wiki
1214

src/detector.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
382382

383383
//if (i % 1000 == 0 || (i < 1000 && i % 100 == 0)) {
384384
//if (i % 100 == 0) {
385-
if (iteration >= (iter_save + 10000) || iteration % 10000 == 0) {
385+
if ((iteration >= (iter_save + 10000) || iteration % 10000 == 0) ||
386+
(iteration >= (iter_save + 1000) || iteration % 1000 == 0) && net.max_batches < 10000)
387+
{
386388
iter_save = iteration;
387389
#ifdef GPU
388390
if (ngpus != 1) sync_nets(nets, ngpus, 0);

0 commit comments

Comments
 (0)