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

The implementation of ReLU in YuGCN #9

Open
htwangtw opened this issue Feb 18, 2022 · 5 comments
Open

The implementation of ReLU in YuGCN #9

htwangtw opened this issue Feb 18, 2022 · 5 comments

Comments

@htwangtw
Copy link
Collaborator

In the current implementation ReLU is called as a function after each convolution layer.
The guided back-propagation tutorial I can find online are applying the hook function when detecting the ReLU function implemented as a module.
I am not sure what would be the right way to modify YuGCN to make this process easier. cc @ltetrel

@htwangtw
Copy link
Collaborator Author

Most of the tutorial I found uses AlexNet as the pretrain model so I would consider refactor the code closer to it:
https://github.com/pytorch/vision/blob/main/torchvision/models/alexnet.py
We might even be able to reuse some of the existing guided backprop modules

@ltetrel
Copy link
Member

ltetrel commented Feb 18, 2022

Sorry I am not sure to follow ? Instead of having an independent hook function, you would like to integrate it directly as a custom relu layer ?

@htwangtw
Copy link
Collaborator Author

Sorry I am not sure to follow ? Instead of having an independent hook function, you would like to integrate it directly as a custom relu layer ?

I actually don't know if I have the right idea to describe the problem correctly. I am not integrating the hook function.

In all pytorch based code I can find, they look for a relu module in the model and apply the hook function. In the current implementation of YuGCN, it cannot find the relu module because it's simply not there

@htwangtw
Copy link
Collaborator Author

I found this tutorial using captum to visualise GCN built with torch_geometric: https://colab.research.google.com/drive/1fLJbFPz0yMCQg81DdCP5I8jXw9LoggKO?usp=sharing

I am going to try it out

@ltetrel
Copy link
Member

ltetrel commented Feb 22, 2022

It is hard to find online documentation on this type of visualization methods, I always hit stuff about digital marketing...
But if you have an explanation I would be happy to hear it :)

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

2 participants