I am trying to use torchviz but it's not giving any output. No error or warning either..
import numpy as np
import torch
from torchviz import make_dot
yhat= a+b*x_train_tensor
make_dot(yhat).render("attached", format="png")
I also tried using make_dot(yhat)
but that doesn't work either. In the above only a small file with the name "attached" is being created but is not an image. Obviously x_train_tensor
and yhat
are all tensors and compute just fine. It's the visualization that I'm having trouble with.
I have already seen these posts.
How do I visualize a net in Pytorch?
https://github.com/szagoruyko/pytorchviz/issues/5
But couldn't solve the problem. I'm using python 3.7.4 64 bit in vscode