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
306e0a46
Unverified
Commit
306e0a46
authored
Apr 25, 2022
by
Sharique Shamim
Committed by
GitHub
Apr 25, 2022
Browse files
[Bug] Fixed optimizer definition in gnn_explainer (#3944) (#3948)
Co-authored-by:
Mufei Li
<
mufeili1996@gmail.com
>
parent
248bece6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/pytorch/gnn_explainer/explain_main.py
examples/pytorch/gnn_explainer/explain_main.py
+1
-1
No files found.
examples/pytorch/gnn_explainer/explain_main.py
View file @
306e0a46
...
...
@@ -52,7 +52,7 @@ def main(args):
node_feat_dim
=
feat_dim
)
# define optimizer
optim
=
th
.
optim
.
Adam
(
explainer
.
parameters
()
,
lr
=
args
.
lr
,
weight_decay
=
args
.
wd
)
optim
=
th
.
optim
.
Adam
(
[
explainer
.
edge_mask
,
explainer
.
node_feat_mask
]
,
lr
=
args
.
lr
,
weight_decay
=
args
.
wd
)
# train the explainer for the given node
dummy_model
.
eval
()
...
...
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