From 3e30214702c6dd9b566f0ce02aa9951afb045909 Mon Sep 17 00:00:00 2001 From: dongshuilong Date: Tue, 14 Dec 2021 06:39:47 +0000 Subject: [PATCH] add print class_id for cls cpp infer --- deploy/cpp/src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/cpp/src/main.cpp b/deploy/cpp/src/main.cpp index 1286597a..6f67d934 100644 --- a/deploy/cpp/src/main.cpp +++ b/deploy/cpp/src/main.cpp @@ -103,7 +103,8 @@ int main(int argc, char **argv) { std::cout << "Current total inferen time cost: " << infer_time << " ms." << std::endl; for (int i = 0; i < max_len; ++i) { - printf("\tTop%d: score: %.4f, ", i + 1, out_data[result_index[i]]); + printf("\tTop%d: class_id: %d, score: %.4f, ", i + 1, result_index[i], + out_data[result_index[i]]); if (label_output_equal_flag) printf("label: %s\n", config.id_map[result_index[i]].c_str()); } -- GitLab