From 608a090f2b9fda1aa9228d25c7368d16581939cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=B5=9C=EC=84=B1=EC=A7=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Principal=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Fri, 15 Jun 2018 10:24:16 +0900 Subject: [PATCH] Modify initialization for gather operation (#1666) This commit modifies initialization for gather operation. - initialize from 0, not 1. - because gather indices' values should be within input data coverage. - for example, suppose input data[300], 0=< indices data's value <299. Signed-off-by: SungJin Choi --- libs/support/tflite/src/Diff.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/support/tflite/src/Diff.cpp b/libs/support/tflite/src/Diff.cpp index 594f18e..14fac61 100644 --- a/libs/support/tflite/src/Diff.cpp +++ b/libs/support/tflite/src/Diff.cpp @@ -269,10 +269,9 @@ int RandomTestRunner::run(const nnfw::support::tflite::interp::Builder &builder) nnfw::util::tensor::iterate(pure_view.shape()) << [&](const nnfw::util::tensor::Index &ind) { // TODO Generate random values - ++value; - pure_view.at(ind) = value; nnapi_view.at(ind) = value; + ++value; }; }; -- 2.7.4