diff --git a/src/mlpack/methods/ann/layer/convolution_impl.hpp b/src/mlpack/methods/ann/layer/convolution_impl.hpp index a4bcb367a6..567cc85f85 100644 --- a/src/mlpack/methods/ann/layer/convolution_impl.hpp +++ b/src/mlpack/methods/ann/layer/convolution_impl.hpp @@ -384,8 +384,8 @@ void ConvolutionType< (padWLeft != 0 || padWRight != 0 || padHTop != 0 || padHBottom != 0); // To perform the backward pass, we need to rotate all the filters. - arma::Cube rotatedFilters(weight.n_cols, - weight.n_rows, weight.n_slices); + arma::Cube rotatedFilters(weight.n_rows, + weight.n_cols, weight.n_slices); // To perform the backward pass, we need to dilate all the mappedError. arma::Cube dilatedMappedError;