-
Notifications
You must be signed in to change notification settings - Fork 107
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: 'dict' object has no attribute 'grad_fn' occured when visualizing the network structure #10
Comments
I'm not very familiar with torchviz, will look into it. Meanwhile,
|
Hi, @amlankar , Thanks for your reply. I tried the suggestions that you mentioned step by step. Unfortunatly, i got the same error. And i have tested the attribute
The previous error just gone, and a new KeyError occured :
I'm sorry to bother you again. Why the KeyError occured when the make_dot func called? What's more appreciative , would you mind provide me a way to visualize the network structure of MLE ? This work will help me a lot. thx. |
@Jacoobr for visualising the network, i guess you can use also use add_graph parameter in tensorboardX while training. I have never tried in this training. But normally I used to do that for visualising networks. :) |
This is a great question and we haven't done this. We'd love it if someone could use existing tools to visualize the network in a friendly way. |
Hi, @amlankar . When i try to visulize the MLE training network structure by add the
**make_dot()**
function from the package torchviz, the code i added in train(self, epoch) function of train_ce.py script as bellow:Then i get the 'grad_fn' Error like this:
Why the grad_fn of Variable output just gone when the make_dot() function called and how can i fix the 'grad_fn' Error ? And i try to use SummaryWriter of tensorboardX to do the same thing also, when testing by generate_annotation.py script and training by mle_ce.py script, I got the same Error. What's more important, if you have some other way to visulize the MLE network structure please let me konw. Thank you. Appreciative for your reply.
The text was updated successfully, but these errors were encountered: