Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add_graph() show error 'torch._C.Value' object has no attribute 'uniqueName' with torch 1.2.0

See original GitHub issue

Describe 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),
        self.fc2 = nn.Sequential(
            nn.Linear(120, 84),
        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



Python environment Python 3.6

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

brickmakercommented, Aug 19, 2019

same with python=3.7.4, torch=1.2.0

vinthonycommented, Sep 15, 2019

try to build from source with :

git clone && cd tensorboardX && python install
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found