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
8dbf3a47
Unverified
Commit
8dbf3a47
authored
Nov 22, 2021
by
Krzysztof Sadowski
Committed by
GitHub
Nov 22, 2021
Browse files
[NN] Fix GATv2Conv residual for mini-batch (#3535)
parent
ea8b5d79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
python/dgl/nn/pytorch/conv/gatv2conv.py
python/dgl/nn/pytorch/conv/gatv2conv.py
+1
-0
No files found.
python/dgl/nn/pytorch/conv/gatv2conv.py
View file @
8dbf3a47
...
@@ -287,6 +287,7 @@ class GATv2Conv(nn.Module):
...
@@ -287,6 +287,7 @@ class GATv2Conv(nn.Module):
-
1
,
self
.
_num_heads
,
self
.
_out_feats
)
-
1
,
self
.
_num_heads
,
self
.
_out_feats
)
if
graph
.
is_block
:
if
graph
.
is_block
:
feat_dst
=
feat_src
[:
graph
.
number_of_dst_nodes
()]
feat_dst
=
feat_src
[:
graph
.
number_of_dst_nodes
()]
h_dst
=
h_dst
[:
graph
.
number_of_dst_nodes
()]
graph
.
srcdata
.
update
({
'el'
:
feat_src
})
# (num_src_edge, num_heads, out_dim)
graph
.
srcdata
.
update
({
'el'
:
feat_src
})
# (num_src_edge, num_heads, out_dim)
graph
.
dstdata
.
update
({
'er'
:
feat_dst
})
graph
.
dstdata
.
update
({
'er'
:
feat_dst
})
graph
.
apply_edges
(
fn
.
u_add_v
(
'el'
,
'er'
,
'e'
))
graph
.
apply_edges
(
fn
.
u_add_v
(
'el'
,
'er'
,
'e'
))
...
...
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