Skip to content
Snippets Groups Projects
Commit 1f18fa20 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Export node pass Input information extraction for Optional Data and Param.

parent 5353b25d
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,7 @@ class ExportNode(ABC): ...@@ -126,7 +126,7 @@ class ExportNode(ABC):
@abstractmethod @abstractmethod
def __init__(self, aidge_node: aidge_core.Node, mem_info: List[dict]=None, is_input: bool=False, is_output: bool=False) -> None: def __init__(self, aidge_node: aidge_core.Node, mem_info: List[dict]=None, is_input: bool=False, is_output: bool=False) -> None:
"""Create ExportNode and retieve attriubtes from ``aidge_node``: """Create ExportNode and retrieve attributes from ``aidge_node``:
""" """
super().__init__() super().__init__()
...@@ -199,7 +199,11 @@ class ExportNode(ABC): ...@@ -199,7 +199,11 @@ class ExportNode(ABC):
self.attributes["in_chan"][idx] = get_chan(tensor) self.attributes["in_chan"][idx] = get_chan(tensor)
self.attributes["in_height"][idx] = get_height(tensor) self.attributes["in_height"][idx] = get_height(tensor)
self.attributes["in_width"][idx] = get_width(tensor) self.attributes["in_width"][idx] = get_width(tensor)
elif self.operator.input_category(idx) == aidge_core.InputCategory.OptionalParam or \
self.operator.input_category(idx) == aidge_core.InputCategory.OptionalData:
pass
else: else:
print(self.operator.input_category(idx))
raise RuntimeError(f"No input for {self.node.name()} at input {idx}") raise RuntimeError(f"No input for {self.node.name()} at input {idx}")
for idx, list_child_node_in_id in enumerate(self.node.outputs()): for idx, list_child_node_in_id in enumerate(self.node.outputs()):
self.outputs += [node_in_id[0] self.outputs += [node_in_id[0]
......
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