Skip to content

Commit

Permalink
lint tflmi.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Jun 23, 2022
1 parent 46c0d72 commit f9e9b5a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mlonmcu/flow/tflm/backend/tflmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ def make_op_registrations(self, ops, custom_ops):
"static tflite::MicroMutableOpResolver<" + str(len(ops) + len(custom_ops)) + "> resolver(error_reporter);\n"
)
for op in ops:
out += " if (resolver.Add" + op + "() != kTfLiteOk) {\n error_reporter->Report(\"Add" + op + "() failed\");\n exit(1);\n }\n"
out += (
" if (resolver.Add"
+ op
+ '() != kTfLiteOk) {\n error_reporter->Report("Add'
+ op
+ '() failed");\n exit(1);\n }\n'
)
for op in custom_ops:
op_name = op
op_reg = op
Expand All @@ -62,7 +68,9 @@ def make_op_registrations(self, ops, custom_ops):
+ op_name
+ '", tflite::'
+ op_reg
+ "()) != kTfLiteOk) {\n error_reporter->Report(\"AddCustom" + op_name + "() failed\");\n exit(1);\n }\n"
+ '()) != kTfLiteOk) {\n error_reporter->Report("AddCustom'
+ op_name
+ '() failed");\n exit(1);\n }\n'
)
return out

Expand Down

0 comments on commit f9e9b5a

Please sign in to comment.