add quantization type 83/319983/1 accepted/tizen/9.0/unified/20241117.013220 accepted/tizen/unified/20241108.105526
authorInki Dae <inki.dae@samsung.com>
Wed, 6 Nov 2024 04:46:23 +0000 (13:46 +0900)
committerInki Dae <inki.dae@samsung.com>
Wed, 6 Nov 2024 04:46:23 +0000 (13:46 +0900)
[Version] : 0.0.7
[Issue type] : new feature

Add quantization type to tensor info for quantization tensor.

Change-Id: I65f06daa99af4740cf3ac62884077286c5aa6e38
Signed-off-by: Inki Dae <inki.dae@samsung.com>
packaging/inference-engine-tflite.spec
src/inference_engine_tflite.cpp

index f80e5cbd98fe9a0079229d5230fbba960d43dd52..17da4029ad934dbe99a70b3db7873f3f08da1d9c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       inference-engine-tflite
 Summary:    Tensorflow-Lite based implementation of inference-engine-interface
-Version:    0.0.6
+Version:    0.0.7
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 21a0e05792985c52f7ebe94588bce568cac53e76..a4e83899190cd5fa1f4e498d25bd0e099aeed4ce 100644 (file)
@@ -495,8 +495,8 @@ namespace TFLiteImpl
                                        tensor_info.scale =  quant_parms->scale->data[0];
                                        tensor_info.zero_point = quant_parms->zero_point->data[0];
 
-                                       LOGD("scale of %s : %f", tensor->name, tensor_info.scale);
-                                       LOGD("zero_point of %s : %d", tensor->name, tensor_info.zero_point);
+                                       if (tensor->quantization.type == kTfLiteAffineQuantization)
+                                               tensor_info.quantization_type = INFERENCE_TENSOR_QUANTIZATION_AFFINE;
                                }
 
                        }