torchview
torchview copied to clipboard
Graph is not getting displayed properly
Bug I am trying to visualize ResNet18 model but the graph that is being displayed is cut in half.
Steps To Reproduce
import torch
model = torch.hub.load('pytorch/vision:v0.10.0', 'resnet18', pretrained=True)
model.eval();
from torchview import draw_graph
batch_size = 2
model_graph = draw_graph(model, input_size=(batch_size, 3, 32, 32), roll=True, device='meta')
model_graph.visual_graph
Screenshots / Text
if you add this at the start of your notebook then it will fix this issue
import graphviz
graphviz.set_jupyter_format('png')