From 4ce51a7e7033ebe2c9d936b38e77c8289df1ff10 Mon Sep 17 00:00:00 2001 From: Adham Zahran Date: Tue, 3 Oct 2017 13:16:25 +0200 Subject: [PATCH] fix #227 softmax parts of the code wasn't being run when GPU=1 --- src/region_layer.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/region_layer.c b/src/region_layer.c index ba4cc336..e54a7335 100644 --- a/src/region_layer.c +++ b/src/region_layer.c @@ -156,7 +156,6 @@ void forward_region_layer(const layer l, network net) int i,j,b,t,n; memcpy(l.output, net.input, l.outputs*l.batch*sizeof(float)); -#ifndef GPU for (b = 0; b < l.batch; ++b){ for(n = 0; n < l.n; ++n){ int index = entry_index(l, b, n*l.w*l.h, 0); @@ -177,7 +176,6 @@ void forward_region_layer(const layer l, network net) int index = entry_index(l, 0, 0, l.coords + !l.background); softmax_cpu(net.input + index, l.classes + l.background, l.batch*l.n, l.inputs/l.n, l.w*l.h, 1, l.w*l.h, 1, l.output + index); } -#endif memset(l.delta, 0, l.outputs * l.batch * sizeof(float)); if(!net.train) return;