summaryrefslogtreecommitdiff
path: root/tools/tflitefile_tool/operator_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tflitefile_tool/operator_parser.py')
-rwxr-xr-xtools/tflitefile_tool/operator_parser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/tflitefile_tool/operator_parser.py b/tools/tflitefile_tool/operator_parser.py
index 71b1a6d93..2c230c275 100755
--- a/tools/tflitefile_tool/operator_parser.py
+++ b/tools/tflitefile_tool/operator_parser.py
@@ -25,10 +25,9 @@ from operation import Operation
class OperatorParser(object):
- def __init__(self, tf_model, tf_subgraph, perf_predictor=None):
+ def __init__(self, tf_model, tf_subgraph):
self.tf_model = tf_model
self.tf_subgraph = tf_subgraph
- self.perf_predictor = perf_predictor
self.operators_in_list = list()
self.operators_per_type = dict()
# Tensor type string table
@@ -67,8 +66,9 @@ class OperatorParser(object):
def GetTensors(self, tf_tensors_index):
return_list = list()
for tensor_idx in tf_tensors_index:
+ # in case of optional input, tensor_idx == -1
if (tensor_idx < 0):
- return_list.append(Tensor(tensor_idx, 0, 0))
+ return_list.append(Tensor(tensor_idx, None, None))
continue
tf_tensor = self.tf_subgraph.Tensors(tensor_idx)
buffer_idx = tf_tensor.Buffer()