[Filter/TF-Lite] fix bug about nomalization
authorHyoungjooAhn <hello.ahnn@gmail.com>
Thu, 20 Sep 2018 10:56:18 +0000 (19:56 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Fri, 21 Sep 2018 01:53:46 +0000 (10:53 +0900)
Since tensor_transform will do typecast and data nomalization, temporal nomalization code is useless.

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
gst/tensor_filter/tensor_filter_tensorflow_lite_core.cc

index 865456d..431a9ea 100644 (file)
@@ -306,7 +306,7 @@ TFLiteCore::invoke (const GstTensorMemory * input, GstTensorMemory * output)
     for (int j = 0; j < num_of_input[i]; j++) {
       if (inputTensorMeta.info[i].type == _NNS_FLOAT32) {
         (interpreter->typed_tensor < float >(in_tensor))[j] =
-            (((float *) input[i].data)[j] - 127.5f) / 127.5f;
+            ((float *) input[i].data)[j];
       } else if (inputTensorMeta.info[i].type == _NNS_UINT8) {
         (interpreter->typed_tensor < uint8_t > (in_tensor))[j] =
             ((uint8_t *) input[i].data)[j];