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

when I want to see the net structure,I meet an error。 #54

Open
qiangruoyu opened this issue Jan 4, 2020 · 1 comment
Open

when I want to see the net structure,I meet an error。 #54

qiangruoyu opened this issue Jan 4, 2020 · 1 comment

Comments

@qiangruoyu
Copy link

environment:
python:3.7.5 (default, Oct 25 2019, 15:51:11)
[GCC 7.3.0]
pytorch:0.4.1.post2

my code:
import tensorwatch as tw
import time
import torchvision
net = torchvision.models.alexnet()
tw.draw_model(alexnet_model,[1,3,224,224])

the error:
TypeError Traceback (most recent call last)
in
4 import torchvision
5 net = torchvision.models.alexnet()
----> 6 tw.draw_model(alexnet_model,[1,3,224,224])

~/anaconda3/envs/CenterNet/lib/python3.7/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

~/anaconda3/envs/CenterNet/lib/python3.7/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

~/anaconda3/envs/CenterNet/lib/python3.7/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)

~/anaconda3/envs/CenterNet/lib/python3.7/site-packages/tensorwatch/model_graph/hiddenlayer/summary_graph.py in init(self, model, dummy_input, apply_scope_name_workarounds)
88 dummy_input = distiller.convert_tensors_recursively_to(dummy_input, device=device)
89 self.dummy_input = dummy_input
---> 90 trace, _ = jit.get_trace_graph(model_clone, dummy_input, _force_outplace=True)
91
92 # As of PyTorch 1.1.0, ONNX trace optimization has two issues that result in incorrect scope names

TypeError: get_trace_graph() got an unexpected keyword argument '_force_outplace'

Can you help me?
thanks !

@qinb
Copy link

qinb commented Jan 20, 2020

when i change torch==1.1.0 to torch==0.4.1,my problem is changed from #55 to #54, who can help me? Thanks

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

2 participants