alexlenail / NN-SVG

Publication-ready NN-architecture schematics.
http://alexlenail.me/NN-SVG/
MIT License
4.49k stars 579 forks source link

Show texts properly in SVG mode of AlexNet #44

Open SuziKim opened 2 years ago

SuziKim commented 2 years ago

If there's a better way, please feel free to discuss!

alexlenail commented 2 years ago

Thanks for the PR? Could you describe the issue it addresses?

SuziKim commented 2 years ago

Sure, sure. Currently, only webGL mode allows text to be displayed for the AlexNet. It is a hotfix that displays the text of the tensor and conv dimensions in SVG mode.

alexlenail commented 2 years ago

Ah! That's quite useful!

When I test the PR on my machine, switching to SVG mode on the AlexNet vis still disables the "show dimensions" radio buttons. I think you can fix that here?

https://github.com/alexlenail/NN-SVG/blob/7382c74ef088365f67c5560f6f9ab453e19360d4/AlexNet.html#L354-L359

SuziKim commented 2 years ago

@alexlenail I updated your comment in https://github.com/alexlenail/NN-SVG/pull/44/commits/0978d1af0f275c50bc1daf147c99a89c4b092d77. Thank you for your comment!

alexlenail commented 2 years ago

Hi @SuziKim

On your fork, I can't turn on dimension labels in SVG rendering:

image

Is that what you're seeing also?

SuziKim commented 2 years ago

May I ask about your environment? @alexlenail For me, it works on Chrome and Safari on macOS Big Sur, as seen below:

Screen Shot 2021-10-05 at 7 39 03 PM

gitsDhokla commented 2 years ago

Can you make it such that it will make a visualisation for any PyTorch model? also in the conv layers, instead of making big cubes, can you segment it into grids, with multiple filters not connected into a cube but as different layers and also, a small number showing the output dimensions at a chosen layer, with the 2p-k/s equation? Would be really helpful, Thanks :)