Replies: 3 comments 2 replies
-
Hi @ChrisPB3, A possible solution would be inserting all of the nodes in the first place regardless any order and then use their direction relationship (a -> b) to reorder existing nodes with topological sort. |
Beta Was this translation helpful? Give feedback.
-
@ChrisPB3 You can try if https://github.com/ZhangGe6/onnx-modifier works for you. I believe it should do the topoligical sorting for you. |
Beta Was this translation helpful? Give feedback.
-
hello i have this error when i want to use my model.onnx to do some predictions Can you please help me |
Beta Was this translation helpful? Give feedback.
-
I am trying to create a new input and subsequent node in the ONNX graph using the onnx.helper utility. I am able to correctly create the input tensor and node and insert the node into the graph.node list object. If I visualize the model in Netron it appears exactly as I want it but when using the onnx.checker.checkmodel() function it produces the issue of 'Nodes in a graph must be topologically sorted, however input 'tensor_name' of node: name: 'node_name' OpType: Conv is not output of any previous nodes. This issue does not appear if I insert new nodes in between the model input and the original 'input' node.
Please help me with what aspect I need to include in order to maintain the model's topological order when creating these extra inputs and subsequent node structures.
Beta Was this translation helpful? Give feedback.
All reactions