-
Notifications
You must be signed in to change notification settings - Fork 6
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
Problems about make_visualizations.py #2
Comments
Hi! This is the latest version of my code for doing GradCAM. If you could provide a stack trace of the error that would be very helpful! |
Hi! Thank you for your quick reply! About the problem of .backward () is proved that I carelessly omitted it, I'm very sorry about it and I have corrected it. Here are the codes : def grad_cam_cube(model, test_data_loader):
The following code is my definition of GradCAMResnet: class GradCAMResnet(torch.nn.Module):
Thank you for your help! Looking forward to your reply! |
Hi! Thank you for sharing your great work! When I was studying make_ visualizations. py, I met some problems.
You define activations_ hook on line 21 of the program, but line 22 self.gradients = grads is not really initialized. So I found 36 lines of self activations_ hook will not call the function of line 21, which leads to errors in subsequent programs.
Therefore, do you have a good way to solve this problem or can you provide the latest version of the code?
Thank you very much and look forward to your reply! Best regards!
The text was updated successfully, but these errors were encountered: