mert-kurttutan / torchview

torchview: visualize pytorch models
https://torchview.dev
MIT License
793 stars 36 forks source link

input size should be at bottom with graph_dir='BT' #92

Open sarzeaud opened 1 year ago

sarzeaud commented 1 year ago

When the graph is drawn using graph_dir='BT', the input size of each layer should be at bottom and output size at top of each block. This would give a much natural graph, the input arrow of each block arriving on the input line, and the output arrow living it from the output line.

mert-kurttutan commented 1 year ago

I agree this is visually more convenient.

The update needed for this should be very small

It can be done putting conditional html like labelling on the following function

https://github.com/mert-kurttutan/torchview/blob/main/torchview/computation_graph.py#L385

I would really appreciate any contribution.