From 59096ef275ab1ef7dd1f38706e628370bdc44a86 Mon Sep 17 00:00:00 2001 From: Henrik Hoglind Date: Fri, 18 Mar 2022 08:58:11 +0100 Subject: Add size of data in bytes to output tensor print The printing of the output tensor can be truncated, by adding the original size of the output in bytes the included data can be checked for completeness. The dims will tell the number of elements of the output tensor and is not useful for this purpose as the element size can vary. Change-Id: Ied5447e34416a8c6668eeae5c01a5474f103023f --- applications/inference_process/src/inference_process.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/inference_process/src/inference_process.cpp b/applications/inference_process/src/inference_process.cpp index 9438882..264c4ba 100644 --- a/applications/inference_process/src/inference_process.cpp +++ b/applications/inference_process/src/inference_process.cpp @@ -321,6 +321,7 @@ void InferenceProcess::printOutputTensor(TfLiteTensor *output, size_t bytesToPri LOG("%d],\n", output->dims->data[dims_size - 1]); LOG("\"data_address\": \"%08" PRIx32 "\",\n", (uint32_t)output->data.data); + LOG("\"data_bytes\": %d,\n", output->bytes); if (numBytesToPrint) { LOG("\"crc32\": \"%08" PRIx32 "\",\n", crc32); -- cgit v1.2.1