From e928db024f63f6e784565b52ce170e7cca73fa6c Mon Sep 17 00:00:00 2001 From: liamsun2019 Date: Tue, 17 Dec 2024 07:30:06 +0000 Subject: [PATCH] Fix incorrect argc calculation --- examples/minimal/minimal.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/minimal/minimal.cc b/examples/minimal/minimal.cc index 56ece71..abd8961 100644 --- a/examples/minimal/minimal.cc +++ b/examples/minimal/minimal.cc @@ -47,14 +47,14 @@ void setupInput(int argc, auto input_list = interpreter->inputs(); bool use_random_input = false; - if ((!is_cache_mode && input_list.size() != argc - 4) || - (is_cache_mode && input_list.size() != argc - 6)) { + if ((!is_cache_mode && input_list.size() != argc - 3) || + (is_cache_mode && input_list.size() != argc - 5)) { std::cout << "Warning: input count not match between command line and " "model -> generate random data for inputs" << std::endl; use_random_input = true; } - uint32_t i = is_cache_mode ? 6 : 4; + uint32_t i = is_cache_mode ? 5 : 3; //uint32_t i = 4; // argv index for (auto input_idx = 0; input_idx < input_list.size(); input_idx++) {