Fix converting type of zero point in select_operator.py (#6353)
author장지섭/On-Device Lab(SR)/Engineer/삼성전자 <jiseob.jang@samsung.com>
Thu, 8 Aug 2019 00:49:33 +0000 (09:49 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 8 Aug 2019 00:49:33 +0000 (09:49 +0900)
This commit fixes converting type of zero point in select_operator.py.

Signed-off-by: jiseob.jang <jiseob.jang@samsung.com>
tools/tflitefile_tool/select_operator.py

index c5d311d..8923410 100644 (file)
@@ -141,7 +141,7 @@ def GenerateQuantization(new_builder, selected_quantization):
         tflite.QuantizationParameters.QuantizationParametersStartScaleVector(
             new_builder, zeropoint_num)
         for zeropoint_idx in reversed(range(zeropoint_num)):
-            new_builder.PrependFloat32(selected_quantization.ZeroPoint(zeropoint_idx))
+            new_builder.PrependInt64(selected_quantization.ZeroPoint(zeropoint_idx))
         new_zeropoint = new_builder.EndVector(zeropoint_num)
 
     # Create quantization