- Check tflite file correctness to parse operator option table (option table type defined but undefined value)
- Print and exit if operator selector cannot support
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
@staticmethod
def GetBuiltinOptions(options_type, options_table):
+ if options_table == None:
+ print(
+ "Bad flatbuffer file: undefined builtin option table with defined option type"
+ )
+ exit(1)
options = OptionLoader.builtinOptionGen[options_type]()
options.Init(options_table.Bytes, options_table.Pos)
return options
return tflite.GatherOptions.GatherOptionsEnd(new_builder)
# Cannot handle builtin option type yet
- return 0
+ print("Cannot handle this option yet")
+ exit(1)
def GenerateOperator(new_builder, selected_operator, used_tensors_dic,