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
dc1c0ac2
Unverified
Commit
dc1c0ac2
authored
Apr 22, 2022
by
Quan (Andy) Gan
Committed by
GitHub
Apr 22, 2022
Browse files
[Example][Bug] Fix GAT example (#3947)
* fix * oops Co-authored-by:
Mufei Li
<
mufeili1996@gmail.com
>
parent
338db32d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
examples/pytorch/gat/gat.py
examples/pytorch/gat/gat.py
+3
-4
No files found.
examples/pytorch/gat/gat.py
View file @
dc1c0ac2
...
...
@@ -54,7 +54,6 @@ class GAT(nn.Module):
def
forward
(
self
,
inputs
):
h
=
inputs
for
l
in
range
(
self
.
num_layers
):
h
=
self
.
gat_layers
[
l
](
self
.
g
,
h
).
flatten
(
1
)
# output projection
logits
=
self
.
gat_layers
[
-
1
](
self
.
g
,
h
).
mean
(
1
)
return
logits
h
=
self
.
gat_layers
[
l
](
self
.
g
,
h
)
h
=
h
.
flatten
(
1
)
if
l
!=
self
.
num_layers
-
1
else
h
.
mean
(
1
)
return
h
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