From 7c0b56bd8eca245df55e4eafd5d522b3b3f47445 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Tue, 24 Jan 2023 12:27:28 -0500 Subject: [PATCH] The rotated filters have the same size as the original filters. --- src/mlpack/methods/ann/layer/convolution_impl.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;