pytorchviz icon indicating copy to clipboard operation
pytorchviz copied to clipboard

Allow HTML formatting of labels

Open joseppinilla opened this issue 3 years ago • 0 comments

This is a very small change that would allow the full use of the graphviz HTML formatting for each node label. I'm not quite sure if this breaks something else, or if these results could be obtained in another way, but this is how it would work. Let's say I want to use subscripts for weight matrices w1 and w2:

make_dot(loss,params={'w<sub>1</sub>':w1,'w<sub>2</sub>':w2})

graphviz example

I had to add double space (i.e. <br/><br/>) otherwise the lines would overlap.

joseppinilla avatar Mar 18 '21 03:03 joseppinilla