NN-SVG icon indicating copy to clipboard operation
NN-SVG copied to clipboard

Show texts properly in SVG mode of AlexNet

Open SuziKim opened this issue 2 years ago • 7 comments

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

SuziKim avatar Sep 26 '21 06:09 SuziKim

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

alexlenail avatar Sep 28 '21 19:09 alexlenail

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.

SuziKim avatar Oct 01 '21 11:10 SuziKim

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

alexlenail avatar Oct 03 '21 23:10 alexlenail

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

SuziKim avatar Oct 04 '21 07:10 SuziKim

Hi @SuziKim

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

image

Is that what you're seeing also?

alexlenail avatar Oct 05 '21 01:10 alexlenail

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

SuziKim avatar Oct 05 '21 10:10 SuziKim

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 :)

gitsDhokla avatar Jan 27 '22 04:01 gitsDhokla