diff --git a/src/mlpack/methods/ann/layer/lp_pooling.hpp b/src/mlpack/methods/ann/layer/lp_pooling.hpp index 7af72e00bf..b87c496004 100644 --- a/src/mlpack/methods/ann/layer/lp_pooling.hpp +++ b/src/mlpack/methods/ann/layer/lp_pooling.hpp @@ -195,9 +195,10 @@ class LpPooling if (colidx >= 1) val -= inputPre(rowEnd, colidx - 1); - output(i, j) = pow(val, 1.0 / normType); + output(i, j) = val; } } + output = arma::pow(output, 1.0 / normType); } /**