Make sure best.weights is the most recent weights for a given mAP% (#8670)

* issue #8308: memory leaks in map

* update the window title with some training stats

* make sure _best.weights is the most recent weights with that mAP%
This commit is contained in:
Stéphane Charette 2022-09-21 04:03:47 -07:00 committed by GitHub
parent 96f08de683
commit 62e5549cef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
iter_map = iteration;
mean_average_precision = validate_detector_map(datacfg, cfgfile, weightfile, thresh, iou_thresh, 0, net.letter_box, &net_map);// &net_combined);
printf("\n mean_average_precision (mAP@%0.2f) = %f \n", iou_thresh, mean_average_precision);
if (mean_average_precision > best_map) {
if (mean_average_precision >= best_map) {
best_map = mean_average_precision;
printf("New best mAP!\n");
char buff[256];