[mlpack-git] master: Populate the matrix with the entries of the max value. (3967b1e)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Jun 4 04:47:12 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/2f479f388ee3d34e4a20535c3662b1921a4c6c06...7fb32130bd683cf03a853ea2bc6960e80d625955
>---------------------------------------------------------------
commit 3967b1e2a387f0f5d1b563db47713168ad7bf6d3
Author: Marcus Edel <marcus.edel at fu-berlin.de>
Date: Wed Jun 3 12:22:02 2015 +0200
Populate the matrix with the entries of the max value.
>---------------------------------------------------------------
3967b1e2a387f0f5d1b563db47713168ad7bf6d3
src/mlpack/methods/ann/pooling_rules/max_pooling.hpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/mlpack/methods/ann/pooling_rules/max_pooling.hpp b/src/mlpack/methods/ann/pooling_rules/max_pooling.hpp
index f088235..5c38c64 100644
--- a/src/mlpack/methods/ann/pooling_rules/max_pooling.hpp
+++ b/src/mlpack/methods/ann/pooling_rules/max_pooling.hpp
@@ -40,10 +40,8 @@ class MaxPooling
template<typename MatType>
void Unpooling(const MatType& input, const double value, MatType& output)
{
- arma::uword row, col;
- output = arma::zeros<MatType>(input.n_rows, input.n_cols);
- input.max(row, col);
- output(row, col) = value;
+ output = MatType(input.n_rows, input.n_cols);
+ output.fill(value / input.n_elem);
}
};
More information about the mlpack-git
mailing list