aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite_reader.py
diff options
context:
space:
mode:
authorMichael McGeagh <michael.mcgeagh@arm.com>2020-12-03 15:21:36 +0000
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2020-12-07 14:54:45 +0000
commit6f72526b3c74c0e64075563be2ddf7f9708ad12c (patch)
tree34bd513e6a2fa1b96b72682589be3351c0ddf98c /ethosu/vela/tflite_reader.py
parent1e05afa473cf2ca08d2a3464dae6bd2809913c83 (diff)
downloadethos-u-vela-6f72526b3c74c0e64075563be2ddf7f9708ad12c.tar.gz
MLBEDSW-3685 Fix dangerous default value usage
Pylint W0102: When a mutable value as list or dictionary is detected in a default value for an argument. Replace detected instances with None, and upon checking for None, sets the default accordingly Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com> Change-Id: I4eb73d07d01d4cdefa586eb71b9c76746eee3b11
Diffstat (limited to 'ethosu/vela/tflite_reader.py')
-rw-r--r--ethosu/vela/tflite_reader.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py
index 9e202154..93b97f6d 100644
--- a/ethosu/vela/tflite_reader.py
+++ b/ethosu/vela/tflite_reader.py
@@ -214,9 +214,7 @@ class TFLiteSubgraph:
class TFLiteGraph:
- def __init__(
- self, filename, batch_size=1, feed_dict={}, output_node_names=[], initialisation_nodes=[],
- ):
+ def __init__(self, filename, batch_size, feed_dict, output_node_names, initialisation_nodes):
self.op_times = {}
if batch_size is None:
@@ -275,9 +273,7 @@ class TFLiteGraph:
return op_type, ser, custom_code
-def read_tflite(
- filename, batch_size=1, feed_dict={}, output_node_names=[], initialisation_nodes=[],
-):
+def read_tflite(filename, batch_size, feed_dict, output_node_names, initialisation_nodes):
tflite_graph = TFLiteGraph(filename, batch_size, feed_dict, output_node_names, initialisation_nodes)
nng = tflite_graph.nng
nng.refresh_after_modification()