From 08c7cf9c88befd845f00c00d85e40a9eead4b1b3 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Sun, 19 Jun 2016 21:28:15 +0000
Subject: [PATCH] no mean on input binarization
---
src/detection_layer.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/detection_layer.c b/src/detection_layer.c
index 1adda06..1b0f126 100644
--- a/src/detection_layer.c
+++ b/src/detection_layer.c
@@ -133,6 +133,11 @@
best_index = 0;
}
}
+ /*
+ if(1 && *(state.net.seen) < 100000){
+ best_index = rand()%l.n;
+ }
+ */
int box_index = index + locations*(l.classes + l.n) + (i*l.n + best_index) * l.coords;
int tbox_index = truth_index + 1 + l.classes;
@@ -176,12 +181,11 @@
}
}
- if(1){
+ if(0){
float *costs = calloc(l.batch*locations*l.n, sizeof(float));
for (b = 0; b < l.batch; ++b) {
int index = b*l.inputs;
for (i = 0; i < locations; ++i) {
- int truth_index = (b*locations + i)*(1+l.coords+l.classes);
for (j = 0; j < l.n; ++j) {
int p_index = index + locations*l.classes + i*l.n + j;
costs[b*locations*l.n + i*l.n + j] = l.delta[p_index]*l.delta[p_index];
@@ -194,7 +198,6 @@
for (b = 0; b < l.batch; ++b) {
int index = b*l.inputs;
for (i = 0; i < locations; ++i) {
- int truth_index = (b*locations + i)*(1+l.coords+l.classes);
for (j = 0; j < l.n; ++j) {
int p_index = index + locations*l.classes + i*l.n + j;
if (l.delta[p_index]*l.delta[p_index] < cutoff) l.delta[p_index] = 0;
@@ -233,7 +236,7 @@
cuda_pull_array(state.truth, truth_cpu, num_truth);
}
cuda_pull_array(state.input, in_cpu, l.batch*l.inputs);
- network_state cpu_state;
+ network_state cpu_state = state;
cpu_state.train = state.train;
cpu_state.truth = truth_cpu;
cpu_state.input = in_cpu;
--
Gitblit v1.10.0