torchview icon indicating copy to clipboard operation
torchview copied to clipboard

Made the colors of the graph parametrizable

Open hcarolus opened this issue 1 year ago • 3 comments

This pull request adds the color scheme as a member variable to ComputationGraph. By this means, the color scheme of the graph can be changed by setting it via a parameter in the function draw_graph.

A test was added to ensure the new feature works.

This PR resolves #111

hcarolus avatar Nov 04 '24 10:11 hcarolus

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
torchview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 10:57am

vercel[bot] avatar Nov 04 '24 10:11 vercel[bot]

This seems useful and simple enough to implement. Can you also provide a larger (and more practically used example, something like BERT) where we can see the benefit of this (vs previous solution)?.

mert-kurttutan avatar Feb 12 '25 04:02 mert-kurttutan

We should also put some sort of validation for color scheme input, making sure that correct keys are passed and color names. Correct keys is simple. What about color names? Does graphviz provide validation or error when incorrect color names are passed ?

mert-kurttutan avatar Feb 12 '25 04:02 mert-kurttutan