question-mark
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.

tensorboard does not show graph

See original GitHub issue

Describe the bug I use a simple example to add a linear model by add_graph(), generate “runs/Feb06_11-31-24_casperMac.localNet1/events.out.tfevents.1580959884.casperMac.local” file. but after I run the command “tensorboard --logdir=runs”. Then I can not see the graph at http://casperMac.local:6006

Minimal runnable code to reproduce the behavior

# -*- coding: utf-8 -*-
import torch
import torch.nn as nn
import torch.nn.functional as F
from tensorboardX import SummaryWriter


class Net1(nn.Module):
    def __init__(self):
        super(Net1, self).__init__()
        self.conv1 = nn.Conv2d(1, 10, kernel_size=5)
        self.conv2 = nn.Conv2d(10, 20, kernel_size=5)
        self.conv2_drop = nn.Dropout2d()
        self.fc1 = nn.Linear(320, 50)
        self.fc2 = nn.Linear(50, 10)
        self.bn = nn.BatchNorm2d(20)

    def forward(self, x):
        x = F.max_pool2d(self.conv1(x), 2)
        x = F.relu(x) + F.relu(-x)
        x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))
        x = self.bn(x)
        x = x.view(-1, 320)
        x = F.relu(self.fc1(x))
        x = F.dropout(x, training=self.training)
        x = self.fc2(x)
        x = F.softmax(x, dim=1)
        return x


dummy_input = torch.rand(13, 1, 28, 28)

model = Net1()
with SummaryWriter(comment='Net1') as w:
    w.add_graph(model, (dummy_input, ))

Screenshots error

Environment tensorboard 1.13.1 tensorboardX 2.0 tensorflow 1.13.2 tensorflow-estimator 1.13.0 torch 1.4.0 torchvision 0.5.0

Python environment Python 3.6.10 and conda 4.8.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ZizhouJiacommented, Mar 8, 2020

The function scopeName return None in pytorch. It is likely pytorch remove the scopeName in pytorch==1.4

1reaction
Jackintheboxescommented, May 13, 2020

I met the same problem, with torch 1.5.0, torchvision 0.6.0. I tried torch 1.3.0, torchvision 0.4.0 and it worked in Edge

Read more comments on GitHub >

github_iconTop Results From Across the Web

TensorFlow v2: Graph does not appear on TensorBoard #1961
A graph may not appear if TensorFlow could not trace any graph during the execution. For instance, below code does not use @tf.function...
Read more >
there is no graph with tensorboard - tensorflow - Stack Overflow
So I run the script, it prints the results but apparently SummaryWriter produces nothing. I run tensorboard -logdir='./' and of course there is ......
Read more >
Tensorboard not displaying graph - PyTorch Forums
I run it but tensorboard does not show any graph (see attached image). I also run it with my own code and get...
Read more >
Examining the TensorFlow Graph | TensorBoard
TensorBoard's Graphs dashboard is a powerful tool for examining your TensorFlow model. You can quickly view a conceptual graph of your ...
Read more >
Deep Dive Into TensorBoard: Tutorial With Examples
There is a common business saying that you can't improve what you don't ... The Step Time Graph shows a visual of device...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found