aboutsummaryrefslogtreecommitdiff
path: root/utils/GraphUtils.cpp
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2018-11-15 14:43:10 +0000
committerAnthony Barbier <Anthony.barbier@arm.com>2018-11-19 09:58:20 +0000
commit32521430ad67172d372721979e8a32b7d4317620 (patch)
treec18921290341c1d730fbff406960dc7ea7f61306 /utils/GraphUtils.cpp
parentd696cb6d18c2fe66f1abce88bbd14faf2137ef89 (diff)
downloadComputeLibrary-32521430ad67172d372721979e8a32b7d4317620.tar.gz
COMPMID-1750: Add PriorBox operator to graph API.
Change-Id: I5d2ed5dcc342abff8124762f7bdee587cdf20032
Diffstat (limited to 'utils/GraphUtils.cpp')
-rw-r--r--utils/GraphUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/GraphUtils.cpp b/utils/GraphUtils.cpp
index 19fba4c0bf..2f1df7aef2 100644
--- a/utils/GraphUtils.cpp
+++ b/utils/GraphUtils.cpp
@@ -77,8 +77,8 @@ void TFPreproccessor::preprocess(ITensor &tensor)
});
}
-CaffePreproccessor::CaffePreproccessor(std::array<float, 3> mean, bool bgr)
- : _mean(mean), _bgr(bgr)
+CaffePreproccessor::CaffePreproccessor(std::array<float, 3> mean, float scale, bool bgr)
+ : _mean(mean), _scale(scale), _bgr(bgr)
{
if(_bgr)
{
@@ -96,7 +96,7 @@ void CaffePreproccessor::preprocess(ITensor &tensor)
execute_window_loop(window, [&](const Coordinates & id)
{
const float value = *reinterpret_cast<float *>(tensor.ptr_to_element(id)) - _mean[id[channel_idx]];
- *reinterpret_cast<float *>(tensor.ptr_to_element(id)) = value;
+ *reinterpret_cast<float *>(tensor.ptr_to_element(id)) = value * _scale;
});
}