conv_layer bugfix
authorYangqing Jia <jiayq84@gmail.com>
Wed, 23 Oct 2013 23:32:19 +0000 (16:32 -0700)
committerYangqing Jia <jiayq84@gmail.com>
Wed, 23 Oct 2013 23:32:19 +0000 (16:32 -0700)
src/caffe/layers/conv_layer.cpp

index d264d62..f87a798 100644 (file)
@@ -150,7 +150,7 @@ Dtype ConvolutionLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
 
   if (biasterm_) {
     bias_diff = this->blobs_[1]->mutable_cpu_diff();
-    memset(bias_diff, 0., sizeof(Dtype) * this->blobs_[1]->count());
+    memset(bias_diff, 0, sizeof(Dtype) * this->blobs_[1]->count());
     for (int n = 0; n < NUM_; ++n) {
       caffe_cpu_gemv<Dtype>(CblasNoTrans, NUM_OUTPUT_, N_,
           1., top_diff + top[0]->offset(n),
@@ -162,7 +162,7 @@ Dtype ConvolutionLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
   int weight_offset = M_ * K_;
   int col_offset = K_ * N_;
   int top_offset = M_ * N_;
-  memset(weight_diff, 0., sizeof(Dtype) * this->blobs_[0]->count());
+  memset(weight_diff, 0, sizeof(Dtype) * this->blobs_[0]->count());
   for (int n = 0; n < NUM_; ++n) {
     // since we saved memory in the forward pass by not storing all col data,
     // we will need to recompute them.