|
|
|
@ -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; |
|
|
|
|