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
2dff1aba
Commit
2dff1aba
authored
Mar 28, 2019
by
Giuseppe Futia
Committed by
Lingfan Yu
Mar 28, 2019
Browse files
[Bugfix] Fix shape of test_relation tensor in RGCN (#464)
parent
5033d945
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/pytorch/rgcn/link_predict.py
examples/pytorch/rgcn/link_predict.py
+1
-1
No files found.
examples/pytorch/rgcn/link_predict.py
View file @
2dff1aba
...
...
@@ -113,7 +113,7 @@ def main(args):
test_deg
=
test_graph
.
in_degrees
(
range
(
test_graph
.
number_of_nodes
())).
float
().
view
(
-
1
,
1
)
test_node_id
=
torch
.
arange
(
0
,
num_nodes
,
dtype
=
torch
.
long
).
view
(
-
1
,
1
)
test_rel
=
torch
.
from_numpy
(
test_rel
)
.
view
(
-
1
,
1
)
test_rel
=
torch
.
from_numpy
(
test_rel
)
test_norm
=
torch
.
from_numpy
(
test_norm
).
view
(
-
1
,
1
)
test_graph
.
ndata
.
update
({
'id'
:
test_node_id
,
'norm'
:
test_norm
})
test_graph
.
edata
[
'type'
]
=
test_rel
...
...
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