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
torch-scatter
Commits
af375340
Commit
af375340
authored
Feb 12, 2018
by
rusty1s
Browse files
fixed div grad
parent
61eb4d03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_scatter/functions/div.py
torch_scatter/functions/div.py
+1
-1
No files found.
torch_scatter/functions/div.py
View file @
af375340
...
@@ -12,7 +12,7 @@ class ScatterDiv(Scatter): # pragma: no cover
...
@@ -12,7 +12,7 @@ class ScatterDiv(Scatter): # pragma: no cover
def
backward_step
(
self
,
*
data
):
def
backward_step
(
self
,
*
data
):
grad
,
output
,
index
,
input
=
data
grad
,
output
,
index
,
input
=
data
return
(
grad
/
output
.
data
).
gather
(
self
.
dim
,
index
.
data
)
*
input
.
data
return
(
output
.
data
/
grad
).
gather
(
self
.
dim
,
index
.
data
)
*
input
.
data
def
scatter_div_
(
output
,
index
,
input
,
dim
=
0
):
def
scatter_div_
(
output
,
index
,
input
,
dim
=
0
):
...
...
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