From e947bf29af0540eda50fd298bb5492c2d8fa7680 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Fri, 16 Mar 2018 22:03:56 +0000
Subject: [PATCH] C wrappers
---
src/detector.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/detector.c b/src/detector.c
index 59182c4..9f608a0 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -76,6 +76,8 @@
int init_w = net.w;
int init_h = net.h;
+ int iter_save;
+ iter_save = get_current_batch(net);
load_args args = {0};
args.w = net.w;
@@ -89,7 +91,7 @@
args.small_object = l.small_object;
args.d = &buffer;
args.type = DETECTION_DATA;
- args.threads = 4;// 8;
+ args.threads = 8; // 64
args.angle = net.angle;
args.exposure = net.exposure;
@@ -113,7 +115,6 @@
if(l.random && count++%10 == 0){
printf("Resizing\n");
int dim = (rand() % 12 + (init_w/32 - 5)) * 32; // +-160
- //int dim = (rand() % 10 + 10) * 32;
//if (get_current_batch(net)+100 > net.max_batches) dim = 544;
//int dim = (rand() % 4 + 16) * 32;
printf("%d\n", dim);
@@ -177,7 +178,9 @@
#endif // OPENCV
//if (i % 1000 == 0 || (i < 1000 && i % 100 == 0)) {
- if (i % 100 == 0) {
+ //if (i % 100 == 0) {
+ if(i >= (iter_save + 100)) {
+ iter_save = i;
#ifdef GPU
if (ngpus != 1) sync_nets(nets, ngpus, 0);
#endif
--
Gitblit v1.10.0