Closed wpeebles closed 6 years ago
Same problem like yours.
reinstall and change the last lines in your snippet to:
with torch.onnx.set_training(model, False):
trace, _ = torch.jit.get_trace_graph(f, args=(a, b))
make_dot_from_trace(trace)
then it works.
Is there a reason why the following simple example fails? I'm having a hard time figuring it out from the error message.
The error message from running this is:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/torchviz/dot.py", line 110, in make_dot_from_trace torch.onnx._optimize_trace(trace, False) TypeError: _optimize_trace() takes 1 positional argument but 2 were given