You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2018/08/22 19:50:55 UTC
[incubator-mxnet] branch master updated: [MXNET-850] Fix incorrect
abs function call (#12262)
This is an automated email from the ASF dual-hosted git repository.
zhreshold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new a3add6a [MXNET-850] Fix incorrect abs function call (#12262)
a3add6a is described below
commit a3add6af2de740541b97cdaa173ef7f37153ca21
Author: Kellen Sunderland <ke...@gmail.com>
AuthorDate: Wed Aug 22 21:50:43 2018 +0200
[MXNET-850] Fix incorrect abs function call (#12262)
Addresses associated clang build warning.
---
src/operator/correlation.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/operator/correlation.cc b/src/operator/correlation.cc
index be54c05..fe89e84 100644
--- a/src/operator/correlation.cc
+++ b/src/operator/correlation.cc
@@ -73,8 +73,8 @@ inline void CorrelationForward(const Tensor<cpu, 4, Dtype> &out,
out[nbatch][top_channel][i][j] += \
tmp1[nbatch][y1+h][x1+w][channel]*tmp2[nbatch][y2+h][x2+w][channel];
else
- out[nbatch][top_channel][i][j] += \
- fabsf(tmp1[nbatch][y1+h][x1+w][channel]-tmp2[nbatch][y2+h][x2+w][channel]);
+ out[nbatch][top_channel][i][j] += std::abs(\
+ tmp1[nbatch][y1+h][x1+w][channel]-tmp2[nbatch][y2+h][x2+w][channel]);
}
out[nbatch][top_channel][i][j] /= sumelems;
}