summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2020-08-26 08:54:37 +0900
committerInki Dae <inki.dae@samsung.com>2020-08-26 08:54:37 +0900
commit1a82b20c9a2cb70f8f64221bc1b595875939196d (patch)
tree0f4f6e006ae1fd8d6c9e3eca84321860c863765c
parentc0e548611c62a4bafa16d5843da2038165e74600 (diff)
downloadmediavision-1a82b20c9a2cb70f8f64221bc1b595875939196d.tar.gz
mediavision-1a82b20c9a2cb70f8f64221bc1b595875939196d.tar.bz2
mediavision-1a82b20c9a2cb70f8f64221bc1b595875939196d.zip
mv_inference: set tensor size of tensor info structure correctly
size member of inference_engine_tensor_info structure should contain tensor element count which can be calculated with height * width * channel count Change-Id: Ia0eaf676bf996caa26dca58f02d26bc2818eff55 Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--mv_inference/inference/src/Inference.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mv_inference/inference/src/Inference.cpp b/mv_inference/inference/src/Inference.cpp
index eb58c2bf..3b3199b8 100644
--- a/mv_inference/inference/src/Inference.cpp
+++ b/mv_inference/inference/src/Inference.cpp
@@ -635,7 +635,7 @@ namespace inference
if (tensor_info.data_type ==
INFERENCE_TENSOR_DATA_TYPE_FLOAT32) {
tensor_buffer.buffer = new float[tensor_info.size];
- tensor_buffer.size = tensor_info.size * 4;
+ tensor_buffer.size = tensor_info.size;
} else if (tensor_info.data_type ==
INFERENCE_TENSOR_DATA_TYPE_UINT8) {
tensor_buffer.buffer = new unsigned char[tensor_info.size];
@@ -687,7 +687,7 @@ namespace inference
if (tensor_info.data_type ==
INFERENCE_TENSOR_DATA_TYPE_FLOAT32) {
tensor_buffer.buffer = new float[tensor_info.size];
- tensor_buffer.size = tensor_info.size * 4;
+ tensor_buffer.size = tensor_info.size;
} else if (tensor_info.data_type ==
INFERENCE_TENSOR_DATA_TYPE_UINT8) {
tensor_buffer.buffer = new char[tensor_info.size];