Skip to content

Conversation

xhdhr10000
Copy link

Fix issue #4086

With this modification. Run toposort on model in #4086 return successfully with:

import onnx
import onnx_graphsurgeon as gs

graph = gs.import_onnx(onnx.load('./toposort.onnx'))
graph.toposort()
""" Out:
Graph onnx_graphsurgeon_graph (Opset 11)
Local Functions: []
Inputs: [Variable (input): (shape=[], dtype=float32)]
Nodes: identity_0 (Identity)
        Inputs: [
                Variable (input): (shape=[], dtype=float32)
        ]
        Outputs: [
                Variable (identity_0_output): (shape=[], dtype=float32)
        ]
neg_1 (Neg)
        Inputs: [
                Variable (identity_0_output): (shape=[], dtype=float32)
        ]
        Outputs: [
                Variable (neg_1_output): (shape=[], dtype=float32)
        ]
mul_0 (Mul)
        Inputs: [
                Variable (identity_0_output): (shape=[], dtype=float32)
                Variable (neg_1_output): (shape=[], dtype=float32)
        ]
        Outputs: [
                Variable (mul_0_output): (shape=[], dtype=float32)
        ]
Outputs: [Variable (mul_0_output): (shape=[], dtype=float32)]
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant