pytorch tensorboardX可视化问题:AttributeError: 'torch._C.Value' object has no attribute 'debugName'

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
 in ()
     42 model = LeNet()
     43 with SummaryWriter(comment='LeNet') as w:
---> 44      w.add_graph(model, (dummy_input, ))

E:\python3\Anaconda3\lib\site-packages\tensorboardX\writer.py in add_graph(self, model, input_to_model, verbose, **kwargs)
    772                     print('add_graph() only supports PyTorch v0.2.')
    773                     return
--> 774             self._get_file_writer().add_graph(graph(model, input_to_model, verbose, **kwargs))
    775         else:
    776             # Caffe2 models do not have the 'forward' method

E:\python3\Anaconda3\lib\site-packages\tensorboardX\pytorch_graph.py in graph(model, args, verbose, **kwargs)
    290     if verbose:
    291         print(graph)
--> 292     list_of_nodes, node_stats = parse(graph, args)
    293     # We are hardcoding that this was run on CPU even though it might have actually
    294     # run on GPU. Note this is what is shown in TensorBoard and has no bearing

E:\python3\Anaconda3\lib\site-packages\tensorboardX\pytorch_graph.py in parse(graph, args, omit_useless_nodes)
    225 
    226     for node in graph.inputs():
--> 227         if node.debugName() == 'self':
    228             continue
    229         nodes_py.append(NodePyIO(node, input_or_output='Input', debugName=node.debugName()))

AttributeError: 'torch._C.Value' object has no attribute 'debugName'

你可能感兴趣的:(pytorch tensorboardX可视化问题:AttributeError: 'torch._C.Value' object has no attribute 'debugName')