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
fae26dd1
Unverified
Commit
fae26dd1
authored
Aug 04, 2020
by
Quan (Andy) Gan
Committed by
GitHub
Aug 04, 2020
Browse files
[API] remove the expand_as_pair call (#1929)
parent
823eb5be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
examples/pytorch/rgcn-hetero/model.py
examples/pytorch/rgcn-hetero/model.py
+7
-1
No files found.
examples/pytorch/rgcn-hetero/model.py
View file @
fae26dd1
...
...
@@ -101,7 +101,13 @@ class RelGraphConvLayer(nn.Module):
for
i
,
w
in
enumerate
(
th
.
split
(
weight
,
1
,
dim
=
0
))}
else
:
wdict
=
{}
inputs_src
,
inputs_dst
=
dglnn
.
expand_as_pair
(
inputs
,
g
)
if
g
.
is_block
:
inputs_src
=
inputs
inputs_dst
=
{
k
:
v
[:
g
.
number_of_dst_nodes
(
k
)]
for
k
,
v
in
inputs
.
items
()}
else
:
inputs_src
,
inputs_dst
=
inputs
hs
=
self
.
conv
(
g
,
inputs
,
mod_kwargs
=
wdict
)
def
_apply
(
ntype
,
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