From 570f595247db2373e0ee23fe0d1af76697fd88df Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Fri, 20 Mar 2020 12:42:59 +0500 Subject: [PATCH] Remove redundant code from classifier.c --- src/classifier.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/classifier.c b/src/classifier.c index a0c5f734..41acca2a 100644 --- a/src/classifier.c +++ b/src/classifier.c @@ -136,7 +136,7 @@ void train_classifier(char *datacfg, char *cfgfile, char *weightfile, int *gpus, float topk = 0; int count = 0; - double start, end, time_remaining, avg_t_minus_1, avg_t, alpha = 0.01; + double start, time_remaining, avg_t_minus_1, avg_t, alpha = 0.01; start = what_time_is_it_now(); while(get_current_batch(net) < net.max_batches || net.max_batches == 0){ @@ -189,8 +189,7 @@ void train_classifier(char *datacfg, char *cfgfile, char *weightfile, int *gpus, printf("%d, %.3f: %f, %f avg, %f rate, %lf seconds, %ld images\n", get_current_batch(net), (float)(*net.seen)/ train_images_num, loss, avg_loss, get_current_rate(net), sec(clock()-time), *net.seen); #ifdef OPENCV - end = what_time_is_it_now(); - time_remaining = (net.max_batches - i)*(end - start) / 60 / 60; + time_remaining = (net.max_batches - i)*(what_time_is_it_now() - start) / 60 / 60; if (i > 1){ // ignore the first iteration if (i == 2){ avg_t_minus_1 = time_remaining;