From 8fd18add6e060a433629fae3fa2a7ef75df4644e Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Wed, 04 Nov 2015 03:23:42 +0000
Subject: [PATCH] CVPR Experiments

---
 src/network_kernels.cu |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/network_kernels.cu b/src/network_kernels.cu
index 1f0a654..d2c8bf9 100644
--- a/src/network_kernels.cu
+++ b/src/network_kernels.cu
@@ -36,7 +36,7 @@
     for(i = 0; i < net.n; ++i){
         layer l = net.layers[i];
         if(l.delta_gpu){
-            scal_ongpu(l.outputs * l.batch, 0, l.delta_gpu, 1);
+            fill_ongpu(l.outputs * l.batch, 0, l.delta_gpu, 1);
         }
         if(l.type == CONVOLUTIONAL){
             forward_convolutional_layer_gpu(l, state);
@@ -134,6 +134,7 @@
     network_state state;
     int x_size = get_network_input_size(net)*net.batch;
     int y_size = get_network_output_size(net)*net.batch;
+    if(net.layers[net.n-1].type == REGION) y_size = net.layers[net.n-1].truths*net.batch;
     if(!*net.input_gpu){
         *net.input_gpu = cuda_make_array(x, x_size);
         *net.truth_gpu = cuda_make_array(y, y_size);

--
Gitblit v1.10.0