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: module 'torch.jit' has no attribute '_get_trace_graph' #81

Open
AsakusaRinne opened this issue Aug 9, 2020 · 3 comments

Comments

@AsakusaRinne
Copy link

I use pytorch1.2.0 to construct a simple network for MNIST to test this visualization tool. There is no error the first time I run it as:
`hl_graph=hl.build_graph(MyConvNet,torch.zeros([1,1,28,28]))

hl_graph.theme=hl.graph.THEMES["blue"].copy()
hl_graph.save("data/MyConvNet_h1.png",format="png")`
However, since the second time it raise an error as the title shows. I click the 'run' button for many times, and only few try succeed.
Besides, I couldn't find the png file saved to the directory. Is there a possible solution about this?

@Rayaction
Copy link

same problem with me. did u solve it?
AttributeError: module 'torch.jit' has no attribute '_get_trace_graph'

@bjzhangyong
Copy link

Py 3.6, pytorch 1.3.1. And the same problem.
Who can solve it?

@bjzhangyong
Copy link

Py 3.6, pytorch 1.3.1. And the same problem.
Who can solve it?

I modified the '_get_trace_graph' to 'get_trace_graph'. The error information disppeared.
But another problem appeared!

d:\download\hiddenlayer-master\hiddenlayer\pytorch_builder.py in import_graph(hl_graph, model, args, input_names, verbose)
76
77 # Loop through nodes and build HL graph
---> 78 for torch_node in torch_graph.nodes():
79 # Op
80 op = torch_node.kind()

AttributeError: 'NoneType' object has no attribute 'nodes'

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