From: Hyoung Joo Ahn Date: Thu, 17 Jan 2019 07:05:44 +0000 (+0900) Subject: [Filter/Tensorflow] fix bug at input tensor X-Git-Tag: v0.1.0~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a4934e0fe536155da0888b6f323f38dd05530c9;p=platform%2Fupstream%2Fnnstreamer.git [Filter/Tensorflow] fix bug at input tensor fix broken logic at input tensor Signed-off-by: Hyoung Joo Ahn --- diff --git a/gst/nnstreamer/tensor_filter/tensor_filter_tensorflow_core.cc b/gst/nnstreamer/tensor_filter/tensor_filter_tensorflow_core.cc index 446f376..3eb3f33 100644 --- a/gst/nnstreamer/tensor_filter/tensor_filter_tensorflow_core.cc +++ b/gst/nnstreamer/tensor_filter/tensor_filter_tensorflow_core.cc @@ -365,7 +365,7 @@ TFCore::getOutputTensorDim (GstTensorsInfo * info) #define copyInputWithType(type) do { \ for (int idx = 0; idx < array_len; ++idx) \ - inputTensor.flat()(idx) = ((type*)input->data)[idx]; \ + inputTensor.flat()(idx) = ((type*)input[i].data)[idx]; \ } while (0) #define copyOutputWithType(type) do { \ @@ -394,13 +394,13 @@ TFCore::run (const GstTensorMemory * input, GstTensorMemory * output) ts.AddDim(inputTensorMeta.info[i].dimension[j]); } Tensor inputTensor( - getTensorTypeToTF(input->type), + getTensorTypeToTF(input[i].type), ts ); - array_len = input->size / tensor_element_size[input->type]; + array_len = input[i].size / tensor_element_size[input[i].type]; - switch (input->type) { + switch (input[i].type) { case _NNS_INT32: copyInputWithType (int32); break;