-
Notifications
You must be signed in to change notification settings - Fork 864
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
add_graph error #636
Comments
Hi, can you try |
Did you resolve that? l have the same problem |
@manjaro-git What is your environment? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I'm using Add_ Graph, This error has occurred in the system
`import torch
import torch.nn as nn
from tensorboardX import SummaryWriter
class LeNet(nn.Module):
def init(self):
super(LeNet, self).init()
self.conv1 = nn.Sequential( # input_size=(12828)
nn.Conv2d(1, 6, 5, 1, 2),
nn.ReLU(), # (62828)
nn.MaxPool2d(kernel_size=2, stride=2), # output_size=(61414)
)
self.conv2 = nn.Sequential(
nn.Conv2d(6, 16, 5),
nn.ReLU(), # (161010)
nn.MaxPool2d(2, 2) # output_size=(1655)
)
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)
dummy_input = torch.rand(13, 1, 28, 28)
model = LeNet()
with SummaryWriter(comment='LeNet') as w:
w.add_graph(model, (dummy_input,))`
My environment is as follows:
tensorboard 2.5.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.0
tensorboardX 2.4
tensorflow-estimator 2.5.0
torch 1.8.0
torchvision 0.9.0
The error is as follows:
Traceback (most recent call last):
File "D:/RoutineWork/python/Tensorboard/tensorboard.py", line 404, in
w.add_graph(model, (dummy_input,))
File "D:\Anaconda\envs\python37\lib\site-packages\tensorboardX\writer.py", line 944, in add_graph
from torch.utils.tensorboard.pytorch_graph import graph
File "D:\Anaconda\envs\python37\lib\site-packages\torch\utils\tensorboard_init.py", line 1, in
import tensorboard
File "D:\RoutineWork\python\Tensorboard\tensorboard.py", line 404, in
w.add_graph(model, (dummy_input,))
File "D:\Anaconda\envs\python37\lib\site-packages\tensorboardX\writer.py", line 944, in add_graph
from torch.utils.tensorboard._pytorch_graph import graph
File "D:\Anaconda\envs\python37\lib\site-packages\torch\utils\tensorboard_pytorch_graph.py", line 4, in
from tensorboard.compat.proto.config_pb2 import RunMetadata
ModuleNotFoundError: No module named 'tensorboard.compat'; 'tensorboard' is not a package
Process finished with exit code 1
Thank you!
The text was updated successfully, but these errors were encountered: