Skip to content

AttributeError: 'torch._C.Node' object has no attribute 'ival' #81

Open
@strongdiamond

Description

@strongdiamond

Read This First

  • Make sure to describe all the steps to reproduce the issue
  • Include full error message in the description
  • Add OS version, Python version, Pytorch version if applicable

Remember: if we cannot reproduce your problem, we cannot find solution!

### OS Version=win10 64bit
python Version= 3.9.7
Pytorch Version= 1.10.2
tensorwatch=0.9.1

###############################################################################################
‘’‘
tw.draw_model(model, [1, 3, 512, 512],png_filename='unet.png')
File "C:\Anaconda3\envs\pytorch1d10d2\lib\site-packages\tensorwatch_init_.py", line 35, in draw_model
g = pytorch_draw_model.draw_graph(model, input_shape)
File "C:\Anaconda3\envs\pytorch1d10d2\lib\site-packages\tensorwatch\model_graph\hiddenlayer\pytorch_draw_model.py", line 35, in draw_graph
dot = draw_img_classifier(model, args)
File "C:\Anaconda3\envs\pytorch1d10d2\lib\site-packages\tensorwatch\model_graph\hiddenlayer\pytorch_draw_model.py", line 63, in draw_img_classifier
g = SummaryGraph(non_para_model, dummy_input)
File "C:\Anaconda3\envs\pytorch1d10d2\lib\site-packages\tensorwatch\model_graph\hiddenlayer\summary_graph.py", line 221, in init
new_op['attrs'] = OrderedDict([(attr_name, node[attr_name]) for attr_name in node.attributeNames()])
File "C:\Anaconda3\envs\pytorch1d10d2\lib\site-packages\tensorwatch\model_graph\hiddenlayer\summary_graph.py", line 221, in
new_op['attrs'] = OrderedDict([(attr_name, node[attr_name]) for attr_name in node.attributeNames()])
File "C:\Anaconda3\envs\pytorch1d10d2\lib\site-packages\torch\onnx\utils.py", line 1232, in _node_getitem
return getattr(self, sel)(k)
AttributeError: 'torch._C.Node' object has no attribute 'ival'

’‘’
###############################################################################################

What's better than filing issue? Filing a pull request :).

------------------------------------ (Remove above before filing the issue) ------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions