Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmodel: subgraph support #1118

Closed
sh39o opened this issue Jul 5, 2023 · 2 comments
Closed

xmodel: subgraph support #1118

sh39o opened this issue Jul 5, 2023 · 2 comments
Assignees

Comments

@sh39o
Copy link

sh39o commented Jul 5, 2023

Hi @lutzroeder ,

I've tried to enable the graph.groups in the xmodel.js. And I want to show the properties of each xmodel.Subgraph as subgraph properties on the sidebar after each mouse click, just like node-click do.

image

I've studied the source code of netron and set the graph.groups in the xmodel.js. The netron successfully showed the subgraph.

image

However, the properties of xmodel.Subgraph can't be shown on the sidebar after clicking the subgraph/graph.group. I think that the refactor of the view.js is too complicated for me.
I made a pull request on my local fork https://github.com/sh39o/netron/pull/2/files

Can you please give me some advices? Or support the feature in the main branch of netron?

Many Thanks

Best Regards.

@sh39o sh39o added the feature label Jul 5, 2023
@sh39o sh39o changed the title Show Subgraph properties Feature: Show xmodel.subgraph/graph.groups properties Jul 5, 2023
@lutzroeder lutzroeder changed the title Feature: Show xmodel.subgraph/graph.groups properties xmodel: subgraph support Jul 6, 2023
@lutzroeder
Copy link
Owner

lutzroeder commented Jul 6, 2023

@sh39o can you share a sample model file to test the branch.

groups is an experiment using dagre clustering and is deprecated. The approaches used for ONNX functions or nested TensorFlow graph attributes might be worth exploring for nested graphs (see #773 or screenshot below). #68 is tracking hierarchical graph expansion which isn't fully implemented.

image

@sh39o
Copy link
Author

sh39o commented Jul 7, 2023

Many thanks for explaining. The demo above is very clear and the visual performance is very suitable for showing complex branch structures. Unfortunately, the xmodel doesn't support conditional branch or loop structures. (e.g., Scan, For, If in onnx) for the constraint of xir.
If Scan/Loop/If is supported by xir, I'll try to make it visual in netron then :)

I only want to show the attributes of xmodel.Subgraph. Below shows a simple demo with only a conv2d. Since the group is deprecated, I'll try to support the feature locally. Also, I'll close this issue.
toy_release.zip

Thanks again for providing great helps!

Best Regards

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

No branches or pull requests

2 participants