paulgavrikov / visualkeras

Visualkeras is a Python package to help visualize Keras (either standalone or included in TensorFlow) neural network architectures. It allows easy styling to fit most needs. This module supports layered style architecture generation which is great for CNNs (Convolutional Neural Networks), and a graph style architecture, which works great for most models including plain feed-forward networks.
MIT License
582 stars 67 forks source link

show layer dimension as a label inside shapes #28

Closed amirshnll closed 4 months ago

amirshnll commented 2 years ago

hi @paulgavrikov, I appreciate you sharing this helpful library under an open source license. Last night, I wanted to visualize my CNN and see all the resources, and your library is fantastic. However, visualkeras doesn't support layer dimension size; I have added this.

detail: If you need to show layer dimantion you must set legend=True and show_dimantion=True in layered_view .

Changelog:

27

indramal commented 2 years ago

Still, this is not added to this awesome library. I think it is better to add dimensions details in 3D boxes

paulgavrikov commented 2 years ago

Apologies, I rarely Have time for this project anymore and I haven’t used keras in ages … but I’ll take a look.

@amirshnll one thing I’ve noticed already is that you’ve misspelled “dimension” as dimantion

also there’s an older PR that does something similar I think (closed due to inactivity)

amirshnll commented 2 years ago

@paulgavrikov

thank you i fixed "issue, merge request" title

prabathbr commented 2 years ago

@paulgavrikov

thank you i fixed "issue, merge request" title

Thanks you very much for your fork. I just replaced "layered.py" from your fork in my installation and it works.

amirshnll commented 2 years ago

@paulgavrikov thank you i fixed "issue, merge request" title

Thanks you very much for your fork. I just replaced "layered.py" from your fork in my installation and it works.

It's my pleasure @prabathbr

github-actions[bot] commented 2 years ago

Stale pull request message

indramal commented 2 years ago

@amirshnll Link please

prabathbr commented 2 years ago

@amirshnll Link please

You can install official package and replace "layers.py" in your installation with the file from below link. That is what I have done.

https://github.com/semnan-university-ai/visualkeras/blob/master/visualkeras/layered.py

amirshnll commented 2 years ago

@amirshnll Link please

first, you must install @paulgavrikov from pip install visualkeras command second, go to installed path and replace https://github.com/semnan-university-ai/visualkeras/blob/master/visualkeras/layered.py file.

github-actions[bot] commented 1 year ago

Stale pull request message

Soontosh commented 4 months ago

Hey ya'll. Thank you so much for your contribution and pull request - this is a really useful feature. I'll look through the code and test this on my machine. If everything works well, I'll merge this into the main branch. Sorry for the huge delay.

Soontosh commented 4 months ago

Still, this is not added to this awesome library. I think it is better to add dimensions details in 3D boxes

@indramal Thanks for your input. I don't see this as being possible on layered_view, as the 3D boxes will not allow for text to be clearly displayed on them, but it may be beneficial on the graph_view function. I'll try adding this to the grpah_view function and coauthor you for coming up with this idea.

Soontosh commented 4 months ago

Hey @indramal. I've made a few changes to your PR and opened a new PR with you as the coauthor and merged it. I'm closing this PR now.