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
a4214f3f
Commit
a4214f3f
authored
Dec 18, 2017
by
rusty1s
Browse files
doc
parent
919572e3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
torch_scatter/functions/__init__.py
torch_scatter/functions/__init__.py
+8
-0
No files found.
torch_scatter/functions/__init__.py
View file @
a4214f3f
...
...
@@ -3,6 +3,8 @@ from .utils import gen_filled_tensor, gen_output
def
scatter_add_
(
output
,
index
,
input
,
dim
=
0
):
"""If multiple indices reference the same location, their contributions
add."""
return
scatter
(
'add'
,
dim
,
output
,
index
,
input
)
...
...
@@ -12,6 +14,8 @@ def scatter_add(index, input, dim=0, max_index=None, fill_value=0):
def
scatter_sub_
(
output
,
index
,
input
,
dim
=
0
):
"""If multiple indices reference the same location, their negated
contributions add."""
return
scatter
(
'sub'
,
dim
,
output
,
index
,
input
)
...
...
@@ -21,6 +25,8 @@ def scatter_sub(index, input, dim=0, max_index=None, fill_value=0):
def
scatter_mul_
(
output
,
index
,
input
,
dim
=
0
):
"""If multiple indices reference the same location, their
contributions multiply."""
return
scatter
(
'mul'
,
dim
,
output
,
index
,
input
)
...
...
@@ -30,6 +36,8 @@ def scatter_mul(index, input, dim=0, max_index=None, fill_value=1):
def
scatter_div_
(
output
,
index
,
input
,
dim
=
0
):
"""If multiple indices reference the same location, their
contributions divide."""
return
scatter
(
'div'
,
dim
,
output
,
index
,
input
)
...
...
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