Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
97a6d740
Unverified
Commit
97a6d740
authored
Feb 16, 2022
by
Rhett Ying
Committed by
GitHub
Feb 16, 2022
Browse files
[doc] fix error in example results (#3735)
Co-authored-by:
Mufei Li
<
mufeili1996@gmail.com
>
parent
4f7ad258
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
python/dgl/nn/pytorch/explain/gnnexplainer.py
python/dgl/nn/pytorch/explain/gnnexplainer.py
+3
-4
No files found.
python/dgl/nn/pytorch/explain/gnnexplainer.py
View file @
97a6d740
...
...
@@ -219,7 +219,7 @@ class GNNExplainer(nn.Module):
>>> new_center
tensor([1])
>>> sg.num_edges()
2
6
1
2
>>> # Old IDs of the nodes in the subgraph
>>> sg.ndata[dgl.NID]
tensor([ 9, 10, 11, 12])
...
...
@@ -229,9 +229,8 @@ class GNNExplainer(nn.Module):
>>> feat_mask
tensor([0.2638, 0.2738, 0.3039, ..., 0.2794, 0.2643, 0.2733])
>>> edge_mask
tensor([0.8291, 0.2065, 0.1379, 0.2265, 0.8618, 0.7038, 0.2094, 0.8847, 0.2157,
0.6595, 0.1906, 0.8184, 0.2033, 0.7211, 0.1279, 0.1668, 0.1441, 0.8571,
0.1903, 0.1125, 0.8235, 0.1913, 0.5834, 0.2248, 0.8345, 0.9270])
tensor([0.0937, 0.1496, 0.8287, 0.8132, 0.8825, 0.8515, 0.8146, 0.0915, 0.1145,
0.9011, 0.1311, 0.8437])
"""
self
.
model
.
eval
()
num_nodes
=
graph
.
num_nodes
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment