diff --git a/build/darknet/x64/darknet.py b/build/darknet/x64/darknet.py index 55afcb0e..da66e9c7 100644 --- a/build/darknet/x64/darknet.py +++ b/build/darknet/x64/darknet.py @@ -144,6 +144,8 @@ if hasGPU: set_gpu = lib.cuda_set_device set_gpu.argtypes = [c_int] +init_cpu = lib.init_cpu + make_image = lib.make_image make_image.argtypes = [c_int, c_int, c_int] make_image.restype = IMAGE diff --git a/darknet.py b/darknet.py index 55afcb0e..da66e9c7 100644 --- a/darknet.py +++ b/darknet.py @@ -144,6 +144,8 @@ if hasGPU: set_gpu = lib.cuda_set_device set_gpu.argtypes = [c_int] +init_cpu = lib.init_cpu + make_image = lib.make_image make_image.argtypes = [c_int, c_int, c_int] make_image.restype = IMAGE diff --git a/include/darknet.h b/include/darknet.h index 20f87475..2456d601 100644 --- a/include/darknet.h +++ b/include/darknet.h @@ -921,6 +921,9 @@ void stop_timer_and_show(); void stop_timer_and_show_name(char *name); void show_total_time(); +// gemm.h +LIB_API void init_cpu(); + #ifdef __cplusplus } #endif // __cplusplus diff --git a/src/gemm.c b/src/gemm.c index 9d95e054..10e8ff66 100644 --- a/src/gemm.c +++ b/src/gemm.c @@ -2855,3 +2855,10 @@ int test_gpu_blas() return 0; } #endif + + + +void init_cpu() { + is_avx(); + is_fma_avx2(); +} \ No newline at end of file diff --git a/src/parser.c b/src/parser.c index f7086060..91104df3 100644 --- a/src/parser.c +++ b/src/parser.c @@ -379,7 +379,7 @@ layer parse_yolo(list *options, size_params params) iou_loss, l.iou_loss, l.iou_normalizer, l.cls_normalizer, l.scale_x_y); l.beta_nms = option_find_float_quiet(options, "beta_nms", 0.6); - char *nms_kind = option_find_str(options, "nms_kind", "default"); + char *nms_kind = option_find_str_quiet(options, "nms_kind", "default"); if (strcmp(nms_kind, "default") == 0) l.nms_kind = DEFAULT_NMS; else { if (strcmp(nms_kind, "greedynms") == 0) l.nms_kind = GREEDY_NMS; @@ -469,7 +469,7 @@ layer parse_gaussian_yolo(list *options, size_params params) // Gaussian_YOLOv3 else l.iou_loss = IOU; l.beta_nms = option_find_float_quiet(options, "beta_nms", 0.6); - char *nms_kind = option_find_str(options, "nms_kind", "default"); + char *nms_kind = option_find_str_quiet(options, "nms_kind", "default"); if (strcmp(nms_kind, "default") == 0) l.nms_kind = DEFAULT_NMS; else { if (strcmp(nms_kind, "greedynms") == 0) l.nms_kind = GREEDY_NMS;