Closed brando90 closed 4 years ago
# http://www.bnikolic.co.uk/blog/pytorch-detach.html
import torch
from torchviz import make_dot
x=torch.ones(10, requires_grad=True)
weights = {'x':x}
y=x**2
z=x**3
r=(y+z).sum()
make_dot(r).render("attached", format="png")
https://github.com/szagoruyko/pytorchviz/issues/24 seems like of more help.
How does one save the image as a file?