regarding converting onnx model to graph
chencuber opened this issue · comments
Hi,I encounter two questions when reading the code:
-
It seems that we may not need NetworkX to first convert onnx model to a graph of NetworkX (in function "to_networkx"), the overall information may be extracted directly from onnx model into the result graph in "OnnxConverter.convert" method.
-
In "to_networkx" function, you added tensor as a node into the G graph ( e.g., "G.add_edge(input_name, node.name)"), it seems no use but has to skip the tensor node when calculating the inbounds/outbounds in "OnnxConverter.convert" method as follows:
for succ in self.G.successors(node):
for succ_succ in self.G.successors(succ):
...
just want to know is there something I do not understand about the above code, many thanks!
Thanks for your questions! The module based on networkx
is legacy code and not used anymore. Thanks for reminding us for this issue. We will refine the code of this part with networkx
removed.
Hi, we have refined the graph generation part in PR #47 and merged it to main
branch. Thanks again for your kindly reminder. This issue will be closed if there is no further discussion. If you have any problem, please feel free to raise a new issue.