singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject incubator-singa git commit: SINGA-139 Fixed a bug in built-in convolution layer
Date Sat, 23 Jan 2016 05:25:28 GMT
Repository: incubator-singa
Updated Branches:
  refs/heads/master f32c78b0a -> 5526c5176


SINGA-139 Fixed a bug in built-in convolution layer


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/5526c517
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/5526c517
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/5526c517

Branch: refs/heads/master
Commit: 5526c5176d0a8cca1784a93e511d06ca8252a4b2
Parents: f32c78b
Author: XiangruiCAI <caixr91@gmail.com>
Authored: Fri Jan 22 21:35:43 2016 +0800
Committer: XiangruiCAI <caixr91@gmail.com>
Committed: Fri Jan 22 21:35:43 2016 +0800

----------------------------------------------------------------------
 src/neuralnet/neuron_layer/convolution.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/5526c517/src/neuralnet/neuron_layer/convolution.cc
----------------------------------------------------------------------
diff --git a/src/neuralnet/neuron_layer/convolution.cc b/src/neuralnet/neuron_layer/convolution.cc
index bde2f08..e77e9ca 100644
--- a/src/neuralnet/neuron_layer/convolution.cc
+++ b/src/neuralnet/neuron_layer/convolution.cc
@@ -154,7 +154,7 @@ void CConvolutionLayer::ComputeFeature(int flag,
 
   for (int n = 0; n < batchsize_; n++) {
     Im2col(src[n].dptr, channels_, height_, width_,
-        kernel_x_, kernel_y_, pad_x_, pad_y_, stride_x_, stride_y_, col.dptr);
+        kernel_y_, kernel_x_, pad_y_, pad_x_, stride_y_, stride_x_, col.dptr);
     data[n] = dot(weight, col);
   }
   data += expr::broadcast<1>(bias, data.shape);
@@ -178,12 +178,12 @@ void CConvolutionLayer::ComputeGradient(int flag,
   gbias = expr::sumall_except_dim<1>(grad);
   for (int n = 0; n < batchsize_; n++) {
     Im2col(src[n].dptr, channels_, height_, width_,
-        kernel_x_, kernel_y_, pad_x_, pad_y_, stride_x_, stride_y_, col.dptr);
+        kernel_y_, kernel_x_, pad_y_, pad_x_, stride_y_, stride_x_, col.dptr);
     gweight += dot(grad[n], col.T());
     if (gsrcblob != nullptr) {
       gcol = dot(weight.T(), grad[n]);
       Col2im(gcol.dptr, channels_, height_, width_,
-          kernel_x_, kernel_y_, pad_x_, pad_y_, stride_x_, stride_y_,
+          kernel_y_, kernel_x_, pad_y_, pad_x_, stride_y_, stride_x_,
           gsrc[n].dptr);
     }
   }


Mime
View raw message