Skip to content
Snippets Groups Projects
Commit 56be9489 authored by Axel Farrugia's avatar Axel Farrugia
Browse files

[Refactor] node.ignore is now a flag instead of a required attribute

parent 7a53d26d
No related branches found
No related tags found
No related merge requests found
...@@ -167,7 +167,6 @@ def exclude_unwanted_producers(model): ...@@ -167,7 +167,6 @@ def exclude_unwanted_producers(model):
nodes_to_ignore = ["Mul", "BitShift"] nodes_to_ignore = ["Mul", "BitShift"]
for node in model.get_nodes(): for node in model.get_nodes():
node.attributes().ignore = False
if node.type() == "Producer": if node.type() == "Producer":
children_nodes = [n.type() for n in node.get_children()] children_nodes = [n.type() for n in node.get_children()]
for node_type in nodes_to_ignore: for node_type in nodes_to_ignore:
......
...@@ -47,15 +47,7 @@ class ProducerCPP(ExportNode): ...@@ -47,15 +47,7 @@ class ProducerCPP(ExportNode):
def __init__(self, node, mem_info): def __init__(self, node, mem_info):
super().__init__(node, mem_info) super().__init__(node, mem_info)
self.values = np.array(self.operator.get_output(0)) self.values = np.array(self.operator.get_output(0))
if node.attributes().has_attr("ignore"): self.ignore = node.attributes().has_attr("ignore")
self.ignore = node.attributes().ignore
else:
self.ignore = False
if node.attributes().has_attr("ignore"):
self.ignore = node.attributes().ignore
else:
self.ignore = False
if len(self.values.shape) == 4: # Note: export in HWC if len(self.values.shape) == 4: # Note: export in HWC
self.values = np.transpose(self.values, (0, 2, 3, 1)) self.values = np.transpose(self.values, (0, 2, 3, 1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment