Skip to content

Commit

Permalink
Save weights for each 1000 iterations if max_batches < 10000
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAB committed Dec 10, 2020
1 parent 1b936ab commit b5ff7f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

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

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

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)
More details in articles on medium:
* [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)
* [YOLOv4](https://medium.com/@alexeyab84/yolov4-the-most-accurate-real-time-neural-network-on-ms-coco-dataset-73adfd3602fe?source=friends_link&sk=6039748846bbcf1d960c3061542591d7)

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

Expand Down
4 changes: 3 additions & 1 deletion src/detector.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i

//if (i % 1000 == 0 || (i < 1000 && i % 100 == 0)) {
//if (i % 100 == 0) {
if (iteration >= (iter_save + 10000) || iteration % 10000 == 0) {
if ((iteration >= (iter_save + 10000) || iteration % 10000 == 0) ||
(iteration >= (iter_save + 1000) || iteration % 1000 == 0) && net.max_batches < 10000)
{
iter_save = iteration;
#ifdef GPU
if (ngpus != 1) sync_nets(nets, ngpus, 0);
Expand Down

0 comments on commit b5ff7f4

Please sign in to comment.