summaryrefslogtreecommitdiff
path: root/tools/tflitefile_tool
diff options
context:
space:
mode:
authorPrasanna R/SNAP /SRI-Bangalore/Engineer/삼성전자 <prasanna.r@samsung.com>2018-12-04 06:29:51 +0530
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>2018-12-04 09:59:51 +0900
commit50ace7e3e82bdc5ea88bf79076f854a98d18d88f (patch)
tree4b9ee982090e2ea356d788c0976fa72475bdb91b /tools/tflitefile_tool
parent5bd35c3e05b36fd74d359046e238ff0de5a1b445 (diff)
downloadnnfw-50ace7e3e82bdc5ea88bf79076f854a98d18d88f.tar.gz
nnfw-50ace7e3e82bdc5ea88bf79076f854a98d18d88f.tar.bz2
nnfw-50ace7e3e82bdc5ea88bf79076f854a98d18d88f.zip
[tfltool] Enable select operator for ArgMax op (#3813)
This patch will enable ArgMax op in tflitetool in select_operator.py Signed-off-by: prasannar <prasanna.r@samsung.com>
Diffstat (limited to 'tools/tflitefile_tool')
-rwxr-xr-xtools/tflitefile_tool/select_operator.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/tflitefile_tool/select_operator.py b/tools/tflitefile_tool/select_operator.py
index 42854c2c0..48d814563 100755
--- a/tools/tflitefile_tool/select_operator.py
+++ b/tools/tflitefile_tool/select_operator.py
@@ -643,6 +643,18 @@ def GenerateBuiltinOption(new_builder, selected_builtin_option, builtin_option_t
# ArgMaxOptions: not supported
# LessOptions: not supported
+ # ArgMaxOptions
+ import tflite.ArgMaxOptions
+ if builtin_option_type == tflite.BuiltinOptions.BuiltinOptions().ArgMaxOptions:
+
+ arg_max_option = tflite.ArgMaxOptions.ArgMaxOptions()
+ arg_max_option.Init(selected_builtin_option.Bytes, selected_builtin_option.Pos)
+
+ tflite.ArgMaxOptions.ArgMaxOptionsStart(new_builder)
+ tflite.ArgMaxOptions.ArgMaxOptionsAddOutputType(new_builder,
+ arg_max_option.OutputType())
+ return tflite.ArgMaxOptions.ArgMaxOptionsEnd(new_builder)
+
# NegOptions
import tflite.NegOptions
if builtin_option_type == tflite.BuiltinOptions.BuiltinOptions().NegOptions: