-
Notifications
You must be signed in to change notification settings - Fork 2
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
[WIP] variable num_neighbors for different hops & add self loop in the sampled subgraph #1
Conversation
How do you add self-loop in the sampled subgraph? |
I tried skip-connection (second-order proximity from Adaptive Sampling) in
|
854b67f
to
32a525e
Compare
…_edges (dmlc#1677) * Fix (#1) * Update * Fix * Fix * Update * Fix * Fix * Fix * Fix * Fixg * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Add test case * Trigger CI (#2) * Update * Fix * Fix * Update * Fix * Fix * Fix * Fix * Fixg * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Add test case * test * Fix (#3) * Update * Fix * Fix * Update * Fix * Fix * Fix * Fix * Fixg * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Add test case * test * Fix * Fix * Roll back * Roll back * CI Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
* [Model] Heterogeneous graph support for GNNExplainer (#1) * add HeteroGNNExplainer * GNNExplainer for heterogeenous graph * fix typo * variable name cleanup * added HeteroGNNExplainer test * added doc indexing for HeteroGNNExplainer * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update python/dgl/nn/pytorch/explain/gnnexplainer.py Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Update gnnexplainer.py Change DGLHeteroGraph to DGLGraph, and specified parameter inputs * Added ntype parameter to the explainer_node call * responding to @mufeili's comment regarding restoring empty lines at appriopiate places to be consistent with existing practices * responding to @mufeili's comment regarding restoring empty lines at appriopiate places that were missed in the last commit * docstring comments added based on @mufeili suggestions * indorporated @mufeili requested changes related to docstring model declaration. * example model and test_nn.py added for explain_graphs * explain_nodes fixed and fixed the way hetero num nodes and edges are handled * white spaces removed * lint issues fixed * explain_graph model updated * explain nodes model updated * minor fixes related to gpu compatability * cuda support added * simplify WIP * _init_masks for ennexplainer updated to match heterographs * Update * model simplified and docstring comments updated * nits: docstring udpated * lint check issues updated * lint check updated * soem formatting updated * disabling int32 testing for GNNExplainer * Update Co-authored-by: Kangkook Jee <kangkook.jee@gmail.com> Co-authored-by: ahadjawaid <94938815+ahadjawaid@users.noreply.github.com> Co-authored-by: Mufei Li <mufeili1996@gmail.com> Co-authored-by: kxm180046 <kxm180046@utdallas.edu> Co-authored-by: Kunal Mukherjee <kunmukh@gmail.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-9-26.ap-northeast-1.compute.internal> Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
Description
Different hops might require different num_neighbors to be sampled (For example, in GraphSage,
num_neigh = 25
for the first layer andnum_neigh = 10
for the second layer).test_node_flow.py
passed.TODO: For GraphSage, self loop is needed in the sampled subgraph, which is required to implement an equivalent version in DGL.
![image](https://user-images.githubusercontent.com/24650346/52272661-72cc7500-2982-11e9-8eda-cabb46de2532.png)
Checklist
Please feel free to remove inapplicable items for your PR.
or have been fixed to be compatible with this change
Changes