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),
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:
``````

Expected behavior

Screenshots

Environment

Python environment Python 3.6

### Issue Analytics

• State:
• Created 4 years ago
• Reactions:5

8reactions
brickmakercommented, Aug 19, 2019

same with python=3.7.4, torch=1.2.0

5reactions
vinthonycommented, Sep 15, 2019

try to build from source with :

``````git clone https://github.com/lanpa/tensorboardX && cd tensorboardX && python setup.py install
``````

#### 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 = ' ...
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...
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...

#### Troubleshoot Live Code

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