From a6200cbde8261506bbc4455a8423af0f4fe1781a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Shubham=20Gupta/SNAP=20/SRI-Bangalore/Engineer/=EC=82=BC?= =?utf8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 4 Dec 2018 06:34:24 +0530 Subject: [PATCH] [tfltool] Enable select operator for LogicalOr op (#3824) This patch will enalbe select operator for Logicalor op Signed-off-by: shubham --- tools/tflitefile_tool/select_operator.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/tflitefile_tool/select_operator.py b/tools/tflitefile_tool/select_operator.py index fc570d8..c037472 100755 --- a/tools/tflitefile_tool/select_operator.py +++ b/tools/tflitefile_tool/select_operator.py @@ -718,7 +718,17 @@ def GenerateBuiltinOption(new_builder, selected_builtin_option, builtin_option_t # ArgMinOptions: not supported # FakeQuantOptions: not supported # PackOptions: not supported - # LogicalOrOptions: not supported + + # LogicalOrOptions: + import tflite.LogicalOrOptions + if builtin_option_type == tflite.BuiltinOptions.BuiltinOptions().LogicalOrOptions: + + logical_or_option = tflite.LogicalAndOptions.LogicalOrOptions() + logical_or_option.Init(selected_builtin_option.Bytes, selected_builtin_option.Pos) + + tflite.LogicalOrOptions.LogicalOrOptionsStart(new_builder) + return tflite.LogicalOrOptions.LogicalOrOptionsEnd(new_builder) + # OneHotOptions: not supported # LogicalNotOptions: not supported -- 2.7.4