From 8dc4833e7f51b0a75dad47a00cc0c6c711279868 Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Fri, 14 Feb 2020 18:28:10 +0300 Subject: [PATCH] Minor fix --- src/dark_cuda.c | 2 +- src/detector.c | 5 ++++- src/gaussian_yolo_layer.c | 4 ++-- src/parser.c | 2 +- src/yolo_layer.c | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/dark_cuda.c b/src/dark_cuda.c index 8c4574f5..2ab3b205 100644 --- a/src/dark_cuda.c +++ b/src/dark_cuda.c @@ -495,7 +495,7 @@ void show_cuda_cudnn_info() CHECK_CUDA(cudaRuntimeGetVersion(&cuda_version)); CHECK_CUDA(cudaDriverGetVersion(&cuda_driver_version)); fprintf(stderr, " CUDA-version: %d (%d)", cuda_version, cuda_driver_version); - if(cuda_version < cuda_driver_version) fprintf(stderr, "\n Warning: CUDA-version is lower than Driver-version! \n"); + if(cuda_version > cuda_driver_version) fprintf(stderr, "\n Warning: CUDA-version is higher than Driver-version! \n"); #ifdef CUDNN fprintf(stderr, ", cuDNN: %d.%d.%d", CUDNN_MAJOR, CUDNN_MINOR, CUDNN_PATCHLEVEL); #endif // CUDNN diff --git a/src/detector.c b/src/detector.c index 298f37f3..0aa6f3cc 100644 --- a/src/detector.c +++ b/src/detector.c @@ -225,7 +225,10 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i save_image(im, "truth11"); */ - printf("Loaded: %lf seconds\n", (what_time_is_it_now() - time)); + const double load_time = (what_time_is_it_now() - time); + printf("Loaded: %lf seconds", load_time); + if (load_time > 0.1 && avg_loss > 0) printf(" - performance bottleneck on CPU or Disk HDD/SSD"); + printf("\n"); time = what_time_is_it_now(); float loss = 0; diff --git a/src/gaussian_yolo_layer.c b/src/gaussian_yolo_layer.c index b249c101..b0a0c89a 100644 --- a/src/gaussian_yolo_layer.c +++ b/src/gaussian_yolo_layer.c @@ -661,9 +661,9 @@ void forward_gaussian_yolo_layer(const layer l, network_state state) uc_loss /= l.batch; iou_loss /= l.batch; - printf("Region %d Avg IOU: %f, Class: %f, Obj: %f, No Obj: %f, .5R: %f, .75R: %f, count: %d, loss = %.2f, class_loss = %.2f, iou_loss = %.2f, uc_loss = %.2f \n", + printf("Region %d Avg IOU: %f, Class: %f, Obj: %f, No Obj: %f, .5R: %f, .75R: %f, count: %d, class_loss = %.2f, iou_loss = %.2f, uc_loss = %.2f, total_loss = %.2f \n", state.index, avg_iou/count, avg_cat/class_count, avg_obj/count, avg_anyobj/(l.w*l.h*l.n*l.batch), recall/count, recall75/count, count, - loss, class_loss, iou_loss, uc_loss); + class_loss, iou_loss, uc_loss, loss); } void backward_gaussian_yolo_layer(const layer l, network_state state) diff --git a/src/parser.c b/src/parser.c index 8320ef24..42443cfd 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1965,7 +1965,7 @@ network *load_network_custom(char *cfg, char *weights, int clear, int batch) printf(" Try to load weights: %s \n", weights); load_weights(net, weights); } - //fuse_conv_batchnorm(*net); + fuse_conv_batchnorm(*net); if (clear) (*net->seen) = 0; return net; } diff --git a/src/yolo_layer.c b/src/yolo_layer.c index bf54f630..b1500abf 100644 --- a/src/yolo_layer.c +++ b/src/yolo_layer.c @@ -575,9 +575,9 @@ void forward_yolo_layer(const layer l, network_state state) classification_loss /= l.batch; iou_loss /= l.batch; - printf("v3 (%s loss, Normalizer: (iou: %f, cls: %f) Region %d Avg (IOU: %f, GIOU: %f), Class: %f, Obj: %f, No Obj: %f, .5R: %f, .75R: %f, count: %d, loss = %f, class_loss = %f, iou_loss = %f\n", + printf("v3 (%s loss, Normalizer: (iou: %.2f, cls: %.2f) Region %d Avg (IOU: %f, GIOU: %f), Class: %f, Obj: %f, No Obj: %f, .5R: %f, .75R: %f, count: %d, class_loss = %f, iou_loss = %f, total_loss = %f \n", (l.iou_loss == MSE ? "mse" : (l.iou_loss == GIOU ? "giou" : "iou")), l.iou_normalizer, l.cls_normalizer, state.index, tot_iou / count, tot_giou / count, avg_cat / class_count, avg_obj / count, avg_anyobj / (l.w*l.h*l.n*l.batch), recall / count, recall75 / count, count, - loss, classification_loss, iou_loss); + classification_loss, iou_loss, loss); } void backward_yolo_layer(const layer l, network_state state)