From: Shubham Gupta/SNAP /SRI-Bangalore/Engineer/삼성전자 Date: Thu, 6 Dec 2018 00:57:36 +0000 (+0530) Subject: [tfltool] Enable select operator for Pack op (#3817) X-Git-Tag: 0.3~189 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08d335cc99e461bbfd4240813682855cf37cb32f;p=platform%2Fcore%2Fml%2Fnnfw.git [tfltool] Enable select operator for Pack op (#3817) This patch will enable select operator tflitetool for pack op Signed-off-by: shubham --- diff --git a/tools/tflitefile_tool/select_operator.py b/tools/tflitefile_tool/select_operator.py index b615695..c5d311d 100644 --- a/tools/tflitefile_tool/select_operator.py +++ b/tools/tflitefile_tool/select_operator.py @@ -725,7 +725,19 @@ def GenerateBuiltinOption(new_builder, selected_builtin_option, builtin_option_t # PowOptions: not supported # ArgMinOptions: not supported # FakeQuantOptions: not supported - # PackOptions: not supported + + # PackOptions: + import tflite.PackOptions + if builtin_option_type == tflite.BuiltinOptions.BuiltinOptions().PackOptions: + + pack_option = tflite.PackOptions.PackOptions() + pack_option.Init(selected_builtin_option.Bytes, selected_builtin_option.Pos) + + tflite.PackOptions.PackOptionsStart(new_builder) + tflite.PackOptions.PackOptionsAddValuesCount(new_builder, + pack_option.ValuesCount()) + tflite.PackOptions.PackOptionsAddAxis(new_builder, pack_option.Axis()) + return tflite.PackOptions.PackOptionsEnd(new_builder) # LogicalOrOptions: import tflite.LogicalOrOptions