netron icon indicating copy to clipboard operation
netron copied to clipboard

Graph visualization unnecessarily wide

Open leosh64 opened this issue 3 years ago • 10 comments

For some networks, the visualization of the graph becomes unnecessarily wide. This makes it difficult to understand connections when zoomed in:

image

Throughout the model, there is no section that would justify such a wide visualization.

Below some screenshots when zoomed out:

image

The same issue (unnecessarily high) occurs in horizontal mode:

image

leosh64 avatar Jan 06 '22 11:01 leosh64

I was just about to report this as well!

For example, yolov5n.onnx looks like this for me:

image

This width is somewhat justifiable since the final layers of the model do indeed need the width, but there is no reason for the connections that go from a conv to the following mul to go all the way to the right and back.

KarelPeeters avatar Jan 06 '22 13:01 KarelPeeters

@leosh64 @KarelPeeters @AlessandroMondin can you investigate this and suggest a fix.

dagrejs/dagre#239 has some context. The paper describing the algorithm can be found here and the code here.

lutzroeder avatar Jan 06 '22 16:01 lutzroeder

Hello all, any news on this bug? I am facing the same issue as weel: Screenshot 2022-08-31 at 12 56 39

AlessandroMondin avatar Aug 31 '22 10:08 AlessandroMondin

It seems the second pass (link) of the horizontalCompaction function is related to this issue.

Tested with yolov5n.onnx.

With the second pass Without the second pass
image image

So my bet is everyone should edit the code to adjust the view when needed.

beru avatar Apr 14 '23 19:04 beru