[NoACR][MachineLearning.Inference] Fix bug using wrong handle
authorYelin Jeong <yelini.jeong@samsung.com>
Tue, 5 Dec 2023 08:04:19 +0000 (17:04 +0900)
committerSangjung Woo <again4you@gmail.com>
Tue, 5 Dec 2023 09:29:36 +0000 (18:29 +0900)
This patch fixes the bug which use wrong handle.
GetTensorsCount should use TensorsInfo handle instead of TensorsData handle.

Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
src/Tizen.MachineLearning.Inference/Tizen.MachineLearning.Inference/TensorsData.cs

index 330aacc..8440155 100755 (executable)
@@ -50,7 +50,7 @@ namespace Tizen.MachineLearning.Inference
 
             /* Set count */
             int count = 0;
-            ret = Interop.Util.GetTensorsCount(_handle, out count);
+            ret = Interop.Util.GetTensorsCount(_tensorsInfo.GetTensorsInfoHandle(), out count);
             NNStreamer.CheckException(ret, "unable to get the count of TensorsData");
 
             _dataList = new ArrayList(count);