aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite_reader.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/tflite_reader.py')
-rw-r--r--ethosu/vela/tflite_reader.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py
index 5ab90f04..84c4c3c2 100644
--- a/ethosu/vela/tflite_reader.py
+++ b/ethosu/vela/tflite_reader.py
@@ -19,6 +19,7 @@ import os.path
import numpy as np
+from .errors import InputFileError
from .errors import UnsupportedFeatureError
from .nn_graph import Graph
from .nn_graph import Subgraph
@@ -228,6 +229,9 @@ class TFLiteGraph:
def parse_operator_code(self, code):
c = code.BuiltinCode()
+ if not c in builtin_operator_map:
+ msg = "The input file contains operator code {} which is currently not supported".format(c)
+ raise InputFileError(self.name, msg)
op_type, ser = builtin_operator_map[c]
if c == BuiltinOperator.CUSTOM:
op_type += decode_str(code.CustomCode())