-
Notifications
You must be signed in to change notification settings - Fork 176
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
Using GNNExplainer on my own data #11
Comments
For custom models, the important step is that it needs to be re-trained. In this repo, after finished training, the resulting model is saved to checkpoint, and the explainer_main have to load the model and the ckpt. With custom model, you will need to change the loading of model into your model. So rather than "import models" in explainer_main, you do "import my_own_models". Also see an example in pygeometric (Thanks to Matthias for helping with the incorporation): |
Hi @RexYing , If I use TensorFlow to train a link prediction model, will GNN explainer also deal with well? Thank you! |
Hi, in this case, you can add a learnable mask in your Tensorflow graph convolution layer, and freeze the other learnable parameter of your network as described in the paper. After optimizing with the explanation objective, you can use the optimized mask to produce explanations. This repository is only for pytorch model, but similar implementation can be easily adapted to Tensorflow. |
hi,how to explain a link prediction model? |
This was previously asked but has not been addressed. Is it possible currently to run the GNNExplainer on our own data and models? If so, is it possible to get an example of how to tweak the file to allow this?
The text was updated successfully, but these errors were encountered: