From d473386e4d5e0edcf55e13a2bf3c422a23fac0de Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Tue, 9 Jul 2019 14:21:06 +0100 Subject: COMPMID-2447: Align TFlite nearest neighbor NE/CL functions with ACL Change-Id: Idd7b23247491d6e2e31d19b2a8aa522470ca174c Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/1500 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- src/runtime/NEON/functions/NEScale.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime') diff --git a/src/runtime/NEON/functions/NEScale.cpp b/src/runtime/NEON/functions/NEScale.cpp index 425ee6c4db..be643b3757 100644 --- a/src/runtime/NEON/functions/NEScale.cpp +++ b/src/runtime/NEON/functions/NEScale.cpp @@ -83,7 +83,7 @@ void precompute_dx_dy_offsets(ITensor *dx, ITensor *dy, ITensor *offsets, float execute_window_loop(win, [&](const Coordinates & id) { - const size_t in_xi = (id.x() + 0.5f) * wr; + const size_t in_xi = std::floor((id.x() + sampling_offset) * wr); *reinterpret_cast(offsets_it.ptr()) = in_xi * input_element_size; }, -- cgit v1.2.1