From a08ef29e085236f13fd04246c6774f9682a56208 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 10 Jul 2015 23:38:14 +0000
Subject: [PATCH] NIGHTMARE!!!!
---
src/parser.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/parser.c b/src/parser.c
index 240c6ee..18c3860 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -167,7 +167,7 @@
int rescore = option_find_int(options, "rescore", 0);
int joint = option_find_int(options, "joint", 0);
int objectness = option_find_int(options, "objectness", 0);
- int background = option_find_int(options, "background", 1);
+ int background = option_find_int(options, "background", 0);
detection_layer layer = make_detection_layer(params.batch, params.inputs, classes, coords, joint, rescore, background, objectness);
option_unused(options);
return layer;
@@ -343,6 +343,7 @@
}else{
fprintf(stderr, "Type not recognized: %s\n", s->type);
}
+ l.dontload = option_find_int_quiet(options, "dontload", 0);
net.layers[count] = l;
free_section(s);
n = n->next;
@@ -527,6 +528,7 @@
int i;
for(i = 0; i < net->n && i < cutoff; ++i){
layer l = net->layers[i];
+ if (l.dontload) continue;
if(l.type == CONVOLUTIONAL){
int num = l.n*l.c*l.size*l.size;
fread(l.biases, sizeof(float), l.n, fp);
--
Gitblit v1.10.0