Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tensorboard] Result of the graphs are different across pytorch versions #31305

Closed
as754770178 opened this issue Dec 16, 2019 · 12 comments
Closed
Assignees
Labels
module: tensorboard oncall: visualization Related to visualization in PyTorch, e.g., tensorboard

Comments

@as754770178
Copy link

import torch
from torchvision.models import resnet50
from torch.utils.tensorboard import SummaryWriter


model = resnet50()
writer = SummaryWriter("/home/tensorboard_test")
board_input = torch.rand((3, 224, 224)).unsqueeze(0)
writer.add_graph(model, board_input)
writer.close()

I found that SummaryWriter in different version pytorch, I result is different.
In torch 1.1.0, the result is OK.
In torch 1.2.0, the program not report error, but no graph display in tensorboard.
In torch 1.3.0, the graph display in tensorboard, but the graph different between 1.1.0 and 1.3.0.
The graph, in torch 1.3.0, is very difficult to use.

I suggest revert SummaryWriter to torch 1.1.0.

@as754770178
Copy link
Author

I once submmit Issue #24904, but don't deal with.

@zou3519 zou3519 added module: tensorboard oncall: visualization Related to visualization in PyTorch, e.g., tensorboard labels Dec 16, 2019
@orionr
Copy link
Contributor

orionr commented Dec 16, 2019

cc @sanekmelnikov, @J0Nreynolds, @lanpa

@orionr
Copy link
Contributor

orionr commented Dec 16, 2019

@as754770178, can you do us a favor and try the version in nightly and see if it improves things? We had a regression in 1.3, but should be greatly improved for 1.4.

@as754770178
Copy link
Author

I try 1.4, the graph style is same with 1.3. The network show in horizontal, it's very hard to use.

@orionr
Copy link
Contributor

orionr commented Dec 30, 2019

@as754770178, sorry to hear that. @sanekmelnikov, @J0Nreynolds and @lanpa can you debug for the ResNet-50 architecture? Might not make it for 1.4, but we should try and improve for 1.5 at a minimum.

@as754770178
Copy link
Author

I can't upload the tensorboard graph as a result of network, I describe it. In torch 1.1.0, I open the graph resnet50, the node is common operation such as conv, bn, etc. Now the node is detailed weight, and the graph is very long in horizontal.
I think the format in torch 1.1.0 is good, because I only want to know the network architecture. If user want to comprehend in detail, they open the node to view, like the way in tensorflow.

@lanpa
Copy link
Collaborator

lanpa commented Jan 10, 2020

@as754770178 @orionr This issue should already have been solved before 1.4.0a0+65f6e44 (a month ago)

And here is the result of this version. Would you like to try to build from master or use pytorch-nightly again?
image

@as754770178
Copy link
Author

@lanpa Thanks. The effect is very good.

@as754770178 as754770178 reopened this Jan 11, 2020
@lanpa lanpa changed the title Tensorboard error in different version pytorch [Tensorboard] Result of the graphs are different across pytorch versions Jan 11, 2020
@J0Nreynolds
Copy link
Contributor

Hi @as754770178. Did the suggestion from @lanpa fix your issue?

@as754770178
Copy link
Author

my torch version is 1.4.0a0+2c51e06, the result still like before that is different with @lanpa

@as754770178
Copy link
Author

tensorboard version is 1.14.0

@lanpa
Copy link
Collaborator

lanpa commented Jan 21, 2020

Just tested with torch 1.4.0 from PyPI and the result is good too. Closing this.

@lanpa lanpa closed this as completed Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: tensorboard oncall: visualization Related to visualization in PyTorch, e.g., tensorboard
Projects
None yet
Development

No branches or pull requests

6 participants