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
8bf97719
Unverified
Commit
8bf97719
authored
Jun 07, 2019
by
Lingfan Yu
Committed by
GitHub
Jun 07, 2019
Browse files
[Bugfix] Fix performance bug in edge softmax operator (#624)
parent
7ad0485a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
python/dgl/nn/pytorch/softmax.py
python/dgl/nn/pytorch/softmax.py
+2
-1
No files found.
python/dgl/nn/pytorch/softmax.py
View file @
8bf97719
...
...
@@ -126,7 +126,8 @@ class EdgeSoftmax1(th.autograd.Function):
g
.
edata
[
grad_score_name
]
=
out
*
grad_out
g
.
update_all
(
fn
.
copy_e
(
grad_score_name
,
'm'
),
fn
.
sum
(
'm'
,
accum_name
))
g
.
apply_edges
(
fn
.
e_mul_v
(
out_name
,
accum_name
,
out_name
))
grad_score
=
g
.
edata
[
grad_score_name
]
-
g
.
edata
[
out_name
]
g
.
ndata
.
pop
(
accum_name
)
grad_score
=
g
.
edata
.
pop
(
grad_score_name
)
-
g
.
edata
.
pop
(
out_name
)
return
None
,
grad_score
...
...
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