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
a487a44a
Commit
a487a44a
authored
Aug 07, 2018
by
rusty1s
Browse files
fixed print statements
parent
601b409a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
14 deletions
+10
-14
.travis.yml
.travis.yml
+0
-4
torch_scatter/add.py
torch_scatter/add.py
+2
-2
torch_scatter/div.py
torch_scatter/div.py
+2
-2
torch_scatter/max.py
torch_scatter/max.py
+2
-2
torch_scatter/mean.py
torch_scatter/mean.py
+2
-2
torch_scatter/mul.py
torch_scatter/mul.py
+2
-2
No files found.
.travis.yml
View file @
a487a44a
...
@@ -24,10 +24,6 @@ install:
...
@@ -24,10 +24,6 @@ install:
-
pip install flake8
-
pip install flake8
-
pip install codecov
-
pip install codecov
script
:
script
:
-
which $CC
-
which $CXX
-
$CC --version
-
$CXX --version
-
pycodestyle .
-
pycodestyle .
-
flake8 .
-
flake8 .
-
python setup.py install
-
python setup.py install
...
...
torch_scatter/add.py
View file @
a487a44a
...
@@ -66,8 +66,8 @@ def scatter_add(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
...
@@ -66,8 +66,8 @@ def scatter_add(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
.. testoutput::
.. testoutput::
tensor([[
0,
0,
4,
3,
3,
0],
tensor([[0, 0, 4, 3, 3, 0],
[
2,
4,
4,
0,
0,
0]])
[2, 4, 4, 0, 0, 0]])
"""
"""
src
,
out
,
index
,
dim
=
gen
(
src
,
index
,
dim
,
out
,
dim_size
,
fill_value
)
src
,
out
,
index
,
dim
=
gen
(
src
,
index
,
dim
,
out
,
dim_size
,
fill_value
)
return
out
.
scatter_add_
(
dim
,
index
,
src
)
return
out
.
scatter_add_
(
dim
,
index
,
src
)
torch_scatter/div.py
View file @
a487a44a
...
@@ -85,8 +85,8 @@ def scatter_div(src, index, dim=-1, out=None, dim_size=None, fill_value=1):
...
@@ -85,8 +85,8 @@ def scatter_div(src, index, dim=-1, out=None, dim_size=None, fill_value=1):
.. testoutput::
.. testoutput::
tensor([[
1.0000,
1.0000,
0.2500,
0.5000,
0.5000,
1.0000],
tensor([[1.0000, 1.0000, 0.2500, 0.5000, 0.5000, 1.0000],
[
0.5000,
0.2500,
0.5000,
1.0000,
1.0000,
1.0000]])
[0.5000, 0.2500, 0.5000, 1.0000, 1.0000, 1.0000]])
"""
"""
src
,
out
,
index
,
dim
=
gen
(
src
,
index
,
dim
,
out
,
dim_size
,
fill_value
)
src
,
out
,
index
,
dim
=
gen
(
src
,
index
,
dim
,
out
,
dim_size
,
fill_value
)
return
ScatterDiv
.
apply
(
out
,
src
,
index
,
dim
)
return
ScatterDiv
.
apply
(
out
,
src
,
index
,
dim
)
torch_scatter/max.py
View file @
a487a44a
...
@@ -90,8 +90,8 @@ def scatter_max(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
...
@@ -90,8 +90,8 @@ def scatter_max(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
.. testoutput::
.. testoutput::
tensor([[
0,
0,
4,
3,
2,
0],
tensor([[0, 0, 4, 3, 2, 0],
[
2,
4,
3,
0,
0,
0]])
[2, 4, 3, 0, 0, 0]])
tensor([[-1, -1, 3, 4, 0, 1],
tensor([[-1, -1, 3, 4, 0, 1],
[ 1, 4, 3, -1, -1, -1]])
[ 1, 4, 3, -1, -1, -1]])
"""
"""
...
...
torch_scatter/mean.py
View file @
a487a44a
...
@@ -62,8 +62,8 @@ def scatter_mean(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
...
@@ -62,8 +62,8 @@ def scatter_mean(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
.. testoutput::
.. testoutput::
tensor([[
0.0000,
0.0000,
4.0000,
3.0000,
1.5000,
0.0000],
tensor([[0.0000, 0.0000, 4.0000, 3.0000, 1.5000, 0.0000],
[
1.0000,
4.0000,
2.0000,
0.0000,
0.0000,
0.0000]])
[1.0000, 4.0000, 2.0000, 0.0000, 0.0000, 0.0000]])
"""
"""
out
=
scatter_add
(
src
,
index
,
dim
,
out
,
dim_size
,
fill_value
)
out
=
scatter_add
(
src
,
index
,
dim
,
out
,
dim_size
,
fill_value
)
count
=
scatter_add
(
torch
.
ones_like
(
src
),
index
,
dim
,
None
,
out
.
size
(
dim
))
count
=
scatter_add
(
torch
.
ones_like
(
src
),
index
,
dim
,
None
,
out
.
size
(
dim
))
...
...
torch_scatter/mul.py
View file @
a487a44a
...
@@ -84,8 +84,8 @@ def scatter_mul(src, index, dim=-1, out=None, dim_size=None, fill_value=1):
...
@@ -84,8 +84,8 @@ def scatter_mul(src, index, dim=-1, out=None, dim_size=None, fill_value=1):
.. testoutput::
.. testoutput::
tensor([[
1,
1,
4,
3,
6,
0],
tensor([[1, 1, 4, 3, 6, 0],
[
6,
4,
8,
1,
1,
1]])
[6, 4, 8, 1, 1, 1]])
"""
"""
src
,
out
,
index
,
dim
=
gen
(
src
,
index
,
dim
,
out
,
dim_size
,
fill_value
)
src
,
out
,
index
,
dim
=
gen
(
src
,
index
,
dim
,
out
,
dim_size
,
fill_value
)
return
ScatterMul
.
apply
(
out
,
src
,
index
,
dim
)
return
ScatterMul
.
apply
(
out
,
src
,
index
,
dim
)
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