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
2fc280ba
"vscode:/vscode.git/clone" did not exist on "71f49a5d2a00ccf5417b923b424177bd617e80a9"
Unverified
Commit
2fc280ba
authored
Aug 15, 2020
by
Zihao Ye
Committed by
GitHub
Aug 15, 2020
Browse files
only filling zeros for min/max reducer (#2026)
parent
62e69b67
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
python/dgl/ops/spmm.py
python/dgl/ops/spmm.py
+3
-1
No files found.
python/dgl/ops/spmm.py
View file @
2fc280ba
...
...
@@ -62,6 +62,8 @@ def gspmm(g, op, reduce_op, lhs_data, rhs_data):
ret
=
gspmm_internal
(
g
.
_graph
,
op
,
'sum'
if
reduce_op
==
'mean'
else
reduce_op
,
lhs_data
,
rhs_data
)
# Replace infinity with zero for isolated nodes when reducer is min/max
if
reduce_op
in
[
'min'
,
'max'
]:
ret
=
F
.
replace_inf_with_zero
(
ret
)
# divide in degrees for mean reducer.
...
...
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