From 32521430ad67172d372721979e8a32b7d4317620 Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Thu, 15 Nov 2018 14:43:10 +0000 Subject: COMPMID-1750: Add PriorBox operator to graph API. Change-Id: I5d2ed5dcc342abff8124762f7bdee587cdf20032 --- utils/GraphUtils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils/GraphUtils.cpp') 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 mean, bool bgr) - : _mean(mean), _bgr(bgr) +CaffePreproccessor::CaffePreproccessor(std::array 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(tensor.ptr_to_element(id)) - _mean[id[channel_idx]]; - *reinterpret_cast(tensor.ptr_to_element(id)) = value; + *reinterpret_cast(tensor.ptr_to_element(id)) = value * _scale; }); } -- cgit v1.2.1