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
bedccc23
Unverified
Commit
bedccc23
authored
Jan 14, 2021
by
Tong He
Committed by
GitHub
Jan 14, 2021
Browse files
fix 2532 (#2533)
parent
a9e16c17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
python/dgl/nn/pytorch/conv/gatconv.py
python/dgl/nn/pytorch/conv/gatconv.py
+5
-3
No files found.
python/dgl/nn/pytorch/conv/gatconv.py
View file @
bedccc23
...
@@ -260,9 +260,11 @@ class GATConv(nn.Module):
...
@@ -260,9 +260,11 @@ class GATConv(nn.Module):
h_src
=
self
.
feat_drop
(
feat
[
0
])
h_src
=
self
.
feat_drop
(
feat
[
0
])
h_dst
=
self
.
feat_drop
(
feat
[
1
])
h_dst
=
self
.
feat_drop
(
feat
[
1
])
if
not
hasattr
(
self
,
'fc_src'
):
if
not
hasattr
(
self
,
'fc_src'
):
self
.
fc_src
,
self
.
fc_dst
=
self
.
fc
,
self
.
fc
feat_src
=
self
.
fc
(
h_src
).
view
(
-
1
,
self
.
_num_heads
,
self
.
_out_feats
)
feat_src
=
self
.
fc_src
(
h_src
).
view
(
-
1
,
self
.
_num_heads
,
self
.
_out_feats
)
feat_dst
=
self
.
fc
(
h_dst
).
view
(
-
1
,
self
.
_num_heads
,
self
.
_out_feats
)
feat_dst
=
self
.
fc_dst
(
h_dst
).
view
(
-
1
,
self
.
_num_heads
,
self
.
_out_feats
)
else
:
feat_src
=
self
.
fc_src
(
h_src
).
view
(
-
1
,
self
.
_num_heads
,
self
.
_out_feats
)
feat_dst
=
self
.
fc_dst
(
h_dst
).
view
(
-
1
,
self
.
_num_heads
,
self
.
_out_feats
)
else
:
else
:
h_src
=
h_dst
=
self
.
feat_drop
(
feat
)
h_src
=
h_dst
=
self
.
feat_drop
(
feat
)
feat_src
=
feat_dst
=
self
.
fc
(
h_src
).
view
(
feat_src
=
feat_dst
=
self
.
fc
(
h_src
).
view
(
...
...
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