tensorboardX
tensorboardX copied to clipboard
What's the different between the add_graph function's arguments: input_to_model
In add_graph function,there is a arguments needed: input_to model.When I go and check the source code, the args comments are follows:
input_to_model (torch.Tensor or list of torch.Tensor): A variable or a tuple of variables to be fed.
But when i try 3 different types of input_tensor(input_tensor, input_tensor1) and pass them to the add_graph function.The tensorboardX show 2 different GRAPHS.:
writer = SummaryWriter(log_dir='runs/test-Res50/test-tensor0')
net = torchvision.models.resnet50(pretrained=True)
input_tensor = torch.zeros(10,3,224,224)
input_tensor1 = (torch.zeros(10,3,224,224),)
writer.add_graph(net, input_tensor) #or writer.add_graph(net, input_tensor1)
Does anybody know the difference between two input_tensor, and why the GRAPHS they produce are different?
the input_tensor's GRAPH picture: http://i2.tiimg.com/698066/5755785396df8792.png the input_tensor1's GRAPH picture:http://i2.tiimg.com/698066/2c4af29e936f0d2c.png
Hi, this might be a bug that has been fixed. I tested with torch 1.2 and master branch of tensorboardX, the two inputs have the same rendering result.