From c1c0cfbc18c8a4492cf2f0bcab744a01b057b3e7 Mon Sep 17 00:00:00 2001 From: Abhinav Anand Date: Sat, 6 Feb 2021 02:49:15 +0530 Subject: [PATCH] minor change --- src/mlpack/methods/ann/layer/lp_pooling.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mlpack/methods/ann/layer/lp_pooling.hpp b/src/mlpack/methods/ann/layer/lp_pooling.hpp index e698f89e93..ff360f41e7 100644 --- a/src/mlpack/methods/ann/layer/lp_pooling.hpp +++ b/src/mlpack/methods/ann/layer/lp_pooling.hpp @@ -175,7 +175,7 @@ class LpPooling arma::span(rowidx, rowidx + kernelWidth - 1 - offset), arma::span(colidx, colidx + kernelHeight - 1 - offset)); - output(i, j) = arma::pow(arma::accu(arma::pow(subInput, norm_type)), 1.0/norm_type); + output(i, j) = cmath::pow(arma::accu(arma::pow(subInput, norm_type)), 1.0/norm_type); } } } @@ -201,7 +201,7 @@ class LpPooling { const arma::Mat& inputArea = input(arma::span(i, i + rStep - 1), arma::span(j, j + cStep - 1)); - size_t sum = arma::pow(arma::accu(arma::pow(inputArea, norm_type)), (norm_type-1) / norm_type); + size_t sum = cmath::pow(arma::accu(arma::pow(inputArea, norm_type)), (norm_type-1) / norm_type); unpooledError = arma::Mat(inputArea.n_rows, inputArea.n_cols); unpooledError.fill(error(i / rStep, j / cStep)); unpooledError %= arma::pow(inputArea, norm_type - 1);