From cdd1cb0e8c4fda3671714bb5ad6ba1825cff16d1 Mon Sep 17 00:00:00 2001
From: Puneet Kohli <punkohl@gmail.com>
Date: Sun, 06 May 2018 21:45:26 +0000
Subject: [PATCH] Change matplotlib backend to 'agg' when 'show_plot' is false. This allows the script to be run from command line without any errors (for ex, on a remote machine)
---
src/avgpool_layer_kernels.cu | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/avgpool_layer_kernels.cu b/src/avgpool_layer_kernels.cu
index ca628c6..b7e2770 100644
--- a/src/avgpool_layer_kernels.cu
+++ b/src/avgpool_layer_kernels.cu
@@ -1,3 +1,7 @@
+#include "cuda_runtime.h"
+#include "curand.h"
+#include "cublas_v2.h"
+
extern "C" {
#include "avgpool_layer.h"
#include "cuda.h"
@@ -35,7 +39,7 @@
int out_index = (k + c*b);
for(i = 0; i < w*h; ++i){
int in_index = i + h*w*(k + b*c);
- in_delta[in_index] = out_delta[out_index] / (w*h);
+ in_delta[in_index] += out_delta[out_index] / (w*h);
}
}
--
Gitblit v1.10.0