summaryrefslogtreecommitdiff
path: root/tools/tflitefile_tool
diff options
context:
space:
mode:
authorPrasanna R/SNAP /SRI-Bangalore/Engineer/삼성전자 <prasanna.r@samsung.com>2018-12-05 05:51:42 +0530
committer박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>2018-12-05 09:21:42 +0900
commitc84921ec5c0ecc33bde4d5dadf422de780762132 (patch)
tree8cff0c94cd6ae866e12ed3d406b2bcab02b87666 /tools/tflitefile_tool
parent2de86edf3c32fa4902b3d45ac569d71b1e8895c4 (diff)
downloadnnfw-c84921ec5c0ecc33bde4d5dadf422de780762132.tar.gz
nnfw-c84921ec5c0ecc33bde4d5dadf422de780762132.tar.bz2
nnfw-c84921ec5c0ecc33bde4d5dadf422de780762132.zip
[tfltool] Enable select operator for LogicalNot op (#3819)
This patch enables LogicalNot in tflitetool in select_operator.py Signed-off-by: prasannar <prasanna.r@samsung.com>
Diffstat (limited to 'tools/tflitefile_tool')
-rw-r--r--[-rwxr-xr-x]tools/tflitefile_tool/select_operator.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/tflitefile_tool/select_operator.py b/tools/tflitefile_tool/select_operator.py
index 3469041b4..0100b640d 100755..100644
--- a/tools/tflitefile_tool/select_operator.py
+++ b/tools/tflitefile_tool/select_operator.py
@@ -730,7 +730,16 @@ def GenerateBuiltinOption(new_builder, selected_builtin_option, builtin_option_t
return tflite.LogicalOrOptions.LogicalOrOptionsEnd(new_builder)
# OneHotOptions: not supported
- # LogicalNotOptions: not supported
+
+ # LogicalNotOptions
+ import tflite.LogicalNotOptions
+ if builtin_option_type == tflite.BuiltinOptions.BuiltinOptions().LogicalNotOptions:
+
+ equal_option = tflite.LogicalNotOptions.LogicalNotOptions()
+ equal_option.Init(selected_builtin_option.Bytes, selected_builtin_option.Pos)
+
+ tflite.LogicalNotOptions.LogicalNotOptionsStart(new_builder)
+ return tflite.LogicalNotOptions.LogicalNotOptionsEnd(new_builder)
# UnpackOptions:
import tflite.UnpackOptions