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
c380f0b5
Unverified
Commit
c380f0b5
authored
Apr 13, 2022
by
Mufei Li
Committed by
GitHub
Apr 13, 2022
Browse files
Update gatv2.py (#3921)
Co-authored-by:
Quan (Andy) Gan
<
coin2028@hotmail.com
>
parent
e06e63d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/pytorch/gatv2/gatv2.py
examples/pytorch/gatv2/gatv2.py
+2
-2
No files found.
examples/pytorch/gatv2/gatv2.py
View file @
c380f0b5
...
@@ -45,7 +45,7 @@ class GATv2(nn.Module):
...
@@ -45,7 +45,7 @@ class GATv2(nn.Module):
def
forward
(
self
,
g
,
inputs
):
def
forward
(
self
,
g
,
inputs
):
h
=
inputs
h
=
inputs
for
l
in
range
(
self
.
num_layers
):
for
l
in
range
(
self
.
num_layers
):
h
=
self
.
gatv2_layers
[
l
](
h
).
flatten
(
1
)
h
=
self
.
gatv2_layers
[
l
](
g
,
h
).
flatten
(
1
)
# output projection
# output projection
logits
=
self
.
gatv2_layers
[
-
1
](
h
).
mean
(
1
)
logits
=
self
.
gatv2_layers
[
-
1
](
g
,
h
).
mean
(
1
)
return
logits
return
logits
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