-
Notifications
You must be signed in to change notification settings - Fork 267
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
Support dict input? #44
Comments
That is an issue with the backend this uses of pytorch.jit.get_trace_graph which does not support dict input. |
I have the same problem with dict input: File "/home/snow_ripple/workspace/01_detection/mmdet/apis/inference.py", line 96, in _inference_single Is there a workaround solution? |
Yeah. I also do think a model graph tool supporting dict is very helpful, especially for this hl module, because it definitely helps understand and present large network visually. Looking forward to your contribution. Thanks! |
Maybe you can try the code like the following:
This interface of plotting model seems to simply get the output after feeding into the network. So I just guess it may be helpful to you. BTW, credit to the AlexNet example on https://github.com/szagoruyko/pytorchviz/blob/master/examples.ipynb. |
Thanks @zhangjing1997 ! What is the point of getBuff(0)? Which module have the definition of this function? I assume it is just a placeholder so I modified it to: But it is still complaining about hte lack of other dictionary arguments. |
In my project, getBuff(0) is just a function returning a dict as the input to the network. I think your code is good to run. But actually your model input seems to be a torch tensor, not input. If that's the case, I guess you don't need to use the previous way I mentioned and maybe you could refer to
Otherwise, if your model needs a dict input, can you show the specific error. |
Hey, any progress on this? Anyone making a PR? |
I got a runtime error when I tried to plot a model graph whose input x actually is a dict.
So I'm wondering can this plot tool support dict input.
The text was updated successfully, but these errors were encountered: