add_graph() show error 'torch._C.Value' object has no attribute 'uniqueName' with torch 1.2.0
See original GitHub issueDescribe the bug add_graph() with torch 1.2.0 will show error ‘torch._C.Value’ object has no attribute ‘uniqueName’ but work well with torch 1.1.0
Minimal runnable code to reproduce the behavior
from tensorboardX import SummaryWriter
class LeNet(nn.Module):
def __init__(self):
super(LeNet, self).__init__()
self.conv1 = nn.Sequential( #input_size=(1*28*28)
nn.Conv2d(1, 6, 5, 1, 2),
nn.ReLU(), #(6*28*28)
nn.MaxPool2d(kernel_size=2, stride=2), #output_size=(6*14*14)
)
self.conv2 = nn.Sequential(
nn.Conv2d(6, 16, 5),
nn.ReLU(), #(16*10*10)
nn.MaxPool2d(2, 2) #output_size=(16*5*5)
)
self.fc1 = nn.Sequential(
nn.Linear(16 * 5 * 5, 120),
nn.ReLU()
)
self.fc2 = nn.Sequential(
nn.Linear(120, 84),
nn.ReLU()
)
self.fc3 = nn.Linear(84, 10)
def forward(self, x):
x = self.conv1(x)
x = self.conv2(x)
x = x.view(x.size()[0], -1)
x = self.fc1(x)
x = self.fc2(x)
x = self.fc3(x)
return x
dummy_input = torch.rand(13, 1, 28, 28)
model = LeNet()
with SummaryWriter(comment='Net', log_dir='/output') as w:
w.add_graph(model, (dummy_input, ))
Expected behavior
Screenshots
Environment
Python environment Python 3.6
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:18 (4 by maintainers)
Top Results From Across the Web
'FaceAlignment' object has no attribute '__name__' error - jit
I used the below code. import torch import torchvision import face_alignment. Optionally set detector and some additional detector parameters. face_detector = ' ...
Read more >torch.pow does not work - Stack Overflow
I can't find any information on this issue, and nothing is showing up in search results. Help? EDIT: this problem also occurs when...
Read more >torch-summary - PyPI
Module): PyTorch model to summarize. The model should be fully in either train() or eval() mode. If layers are not all in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
same with python=3.7.4, torch=1.2.0
try to build from source with :