Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix convolution for non-square kernels #3376

Merged
merged 5 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### mlpack ?.?.?
###### ????-??-??
* Bugfix for non-square convolution kernels (#3376).

### mlpack 4.0.1
###### 2022-12-23
Expand Down
4 changes: 2 additions & 2 deletions src/mlpack/methods/ann/layer/convolution_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<typename MatType::elem_type> rotatedFilters(weight.n_cols,
weight.n_rows, weight.n_slices);
arma::Cube<typename MatType::elem_type> rotatedFilters(weight.n_rows,
weight.n_cols, weight.n_slices);

// To perform the backward pass, we need to dilate all the mappedError.
arma::Cube<typename MatType::elem_type> dilatedMappedError;
Expand Down