From 5903e9a5bae3ecd0a25dd15c343a79bdd4ef4f38 Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Fri, 19 Aug 2022 21:00:08 +0900 Subject: [PATCH] mv_machine_learning: fix wrong tensor order [Verion] : 0.23.19-0 [Issue type] : bug fix Fixed wrong tensor order. Tensor order, NWHC, doesn't exist. So correct the tensor order and return width, height and channel value correctly. Change-Id: I53b3078d2121c9718bc5a9864ebefd0d5907b7af Signed-off-by: Inki Dae --- mv_machine_learning/inference/src/InputMetadata.cpp | 10 +++++----- packaging/capi-media-vision.spec | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mv_machine_learning/inference/src/InputMetadata.cpp b/mv_machine_learning/inference/src/InputMetadata.cpp index d6bc290..2ca878d 100644 --- a/mv_machine_learning/inference/src/InputMetadata.cpp +++ b/mv_machine_learning/inference/src/InputMetadata.cpp @@ -207,23 +207,23 @@ namespace inference int LayerInfo::GetWidth() const { if (shapeType == INFERENCE_TENSOR_SHAPE_NCHW) { return dims[3]; - } else { // INFERENCE_TENSOR_SHAPE_NWHC - return dims[1]; + } else { // INFERENCE_TENSOR_SHAPE_NHWC + return dims[2]; } } int LayerInfo::GetHeight() const { if (shapeType == INFERENCE_TENSOR_SHAPE_NCHW) { return dims[2]; - } else { // INFERENCE_TENSOR_SHAPE_NWHC - return dims[2]; + } else { // INFERENCE_TENSOR_SHAPE_NHWC + return dims[1]; } } int LayerInfo::GetChannel() const { if (shapeType == INFERENCE_TENSOR_SHAPE_NCHW) { return dims[1]; - } else { // INFERENCE_TENSOR_SHAPE_NWHC + } else { // INFERENCE_TENSOR_SHAPE_NHWC return dims[3]; } } diff --git a/packaging/capi-media-vision.spec b/packaging/capi-media-vision.spec index 8de4f60..beedef3 100644 --- a/packaging/capi-media-vision.spec +++ b/packaging/capi-media-vision.spec @@ -1,6 +1,6 @@ Name: capi-media-vision Summary: Media Vision library for Tizen Native API -Version: 0.23.18 +Version: 0.23.19 Release: 0 Group: Multimedia/Framework License: Apache-2.0 and BSD-3-Clause -- 2.7.4