Skip to content
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

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

Open
YuhaoYeSteve opened this issue Jan 17, 2020 · 3 comments
Open

Comments

@YuhaoYeSteve
Copy link

ubantu 16.04
torch 1.1.0 pypi_0 pypi
torchstat 0.0.7 pypi_0 pypi
torchvision 0.3.0 pypi_0 pypi
tensorwatch 0.8.7 pypi_0 pypi

@YuhaoYeSteve
Copy link
Author

YuhaoYeSteve commented Jan 17, 2020

After run demo:
`
import sys
import torch
import tensorwatch as tw
import torchvision.models

alexnet_model = torchvision.models.alexnet()
tw.draw_model(alexnet_model, [1, 3, 224, 224])

`

[MAdd]: AdaptiveAvgPool2d is not supported!
[Flops]: AdaptiveAvgPool2d is not supported!
[Memory]: AdaptiveAvgPool2d is not supported!

AttributeError Traceback (most recent call last)
in
1 alexnet_model = torchvision.models.alexnet()
----> 2 tw.draw_model(alexnet_model, [1, 3, 224, 224])

/data/yyh/anaconda3/envs/CenterNet/lib/python3.6/site-packages/tensorwatch/init.py in draw_model(model, input_shape, orientation, png_filename)
33 def draw_model(model, input_shape=None, orientation='TB', png_filename=None): #orientation = 'LR' for landscpe
34 from .model_graph.hiddenlayer import pytorch_draw_model
---> 35 g = pytorch_draw_model.draw_graph(model, input_shape)
36 return g
37

/data/yyh/anaconda3/envs/CenterNet/lib/python3.6/site-packages/tensorwatch/model_graph/hiddenlayer/pytorch_draw_model.py in draw_graph(model, args)
33 args = torch.ones(args)
34
---> 35 dot = draw_img_classifier(model, args)
36 return DotWrapper(dot)
37

/data/yyh/anaconda3/envs/CenterNet/lib/python3.6/site-packages/tensorwatch/model_graph/hiddenlayer/pytorch_draw_model.py in draw_img_classifier(model, dataset, display_param_nodes, rankdir, styles, input_shape)
61 try:
62 non_para_model = distiller.make_non_parallel_copy(model)
---> 63 g = SummaryGraph(non_para_model, dummy_input)
64
65 return sgraph2dot(g, display_param_nodes, rankdir, styles)

/data/yyh/anaconda3/envs/CenterNet/lib/python3.6/site-packages/tensorwatch/model_graph/hiddenlayer/summary_graph.py in init(self, model, dummy_input, apply_scope_name_workarounds)
135 in_out = list(graph.inputs()) + list(graph.outputs())
136 for param in in_out:
--> 137 self.__add_param(param)
138
139 for node in graph.nodes():

/data/yyh/anaconda3/envs/CenterNet/lib/python3.6/site-packages/tensorwatch/model_graph/hiddenlayer/summary_graph.py in __add_param(self, n)
274
275 def __add_param(self, n):
--> 276 if n.debugName() not in self.params:
277 param = self.__tensor_desc(n)
278 self.params[n.debugName()] = param

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

@gjxgjxgjxgjx
Copy link

help

@JobSmith
Copy link

JobSmith commented Aug 19, 2020

I also met this error, who can help???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants