Fixed parameter order
authorSergio <sguada@gmail.com>
Mon, 14 Apr 2014 03:14:43 +0000 (20:14 -0700)
committerJeff Donahue <jeff.donahue@gmail.com>
Sat, 24 May 2014 22:15:11 +0000 (15:15 -0700)
src/caffe/layers/pooling_layer.cu

index 77126e6..8be1521 100644 (file)
@@ -319,6 +319,7 @@ void PoolingLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top,
   const Dtype* top_diff = top[0]->gpu_diff();
   Dtype* bottom_diff = (*bottom)[0]->mutable_gpu_diff();
   int count = (*bottom)[0]->count();
+  CUDA_CHECK(cudaMemset(bottom_diff, 0, sizeof(Dtype) * count));
   int* mask;
   
   switch (this->layer_param_.pooling_param().pool()) {