From fb1ee79576f83d505211267252e070c3cb0f431e Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Mon, 10 Dec 2018 02:22:45 +0300 Subject: [PATCH] Minor fix --- src/detector.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/detector.c b/src/detector.c index bee8ef17..5a970add 100644 --- a/src/detector.c +++ b/src/detector.c @@ -229,7 +229,8 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i #ifdef OPENCV if (!dont_show) { - if (calc_map && (i >= (iter_map + 4*train_images_num/net.batch) || i == net.max_batches) && i >= 1000) { + int calc_map_for_each = 4 * train_images_num / (net.batch * net.subdivisions); + if (calc_map && (i >= (iter_map + calc_map_for_each) || i == net.max_batches) && i >= net.burn_in && i >= 1000) { iter_map = i; mean_average_precision = validate_detector_map(datacfg, cfgfile, weightfile, 0.25, 0.5, &net); printf("\n mean_average_precision = %f \n", mean_average_precision);