[nnpkg_run] Fix wrong index in randomgen (#6856)
author이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>
Fri, 23 Aug 2019 02:16:08 +0000 (22:16 -0400)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Fri, 23 Aug 2019 02:16:08 +0000 (11:16 +0900)
`0` was used (instead of `i`) in loop for generating random inputs.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
tests/tools/nnpackage_run/src/nnpackage_run.cc

index 25a322d..7e0419b 100644 (file)
@@ -100,7 +100,7 @@ int main(const int argc, char **argv)
   for (uint32_t i = 0; i < num_inputs; ++i)
   {
     nnfw_tensorinfo ti;
-    NNPR_ENSURE_STATUS(nnfw_input_tensorinfo(session, 0, &ti));
+    NNPR_ENSURE_STATUS(nnfw_input_tensorinfo(session, i, &ti));
     if (ti.dtype != NNFW_TYPE_TENSOR_FLOAT32)
     {
       std::cerr << "Only float 32bit is supported." << std::endl;