From ec3d050a76ee8c41f35c4531d3fa07a2d9c28ed3 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Thu, 02 Jun 2016 22:25:24 +0000
Subject: [PATCH] hope i didn't break anything
---
src/deconvolutional_layer.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/deconvolutional_layer.c b/src/deconvolutional_layer.c
index 524fc95..d476957 100644
--- a/src/deconvolutional_layer.c
+++ b/src/deconvolutional_layer.c
@@ -134,7 +134,7 @@
int n = l.h*l.w;
int k = l.c;
- bias_output(l.output, l.biases, l.batch, l.n, size);
+ fill_cpu(l.outputs*l.batch, 0, l.output, 1);
for(i = 0; i < l.batch; ++i){
float *a = l.filters;
@@ -145,6 +145,7 @@
col2im_cpu(c, l.n, out_h, out_w, l.size, l.stride, 0, l.output+i*l.n*size);
}
+ add_bias(l.output, l.biases, l.batch, l.n, size);
activate_array(l.output, l.batch*l.n*size, l.activation);
}
@@ -159,8 +160,6 @@
gradient_array(l.output, size*l.n*l.batch, l.activation, l.delta);
backward_bias(l.bias_updates, l.delta, l.batch, l.n, size);
- if(state.delta) memset(state.delta, 0, l.batch*l.h*l.w*l.c*sizeof(float));
-
for(i = 0; i < l.batch; ++i){
int m = l.c;
int n = l.size*l.size*l.n;
--
Gitblit v1.10.0