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
fc012e08
Commit
fc012e08
authored
Feb 04, 2020
by
rusty1s
Browse files
bugfix for scatter mean
parent
93e779f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_scatter/scatter.py
torch_scatter/scatter.py
+1
-1
No files found.
torch_scatter/scatter.py
View file @
fc012e08
...
@@ -60,7 +60,7 @@ def scatter_mean(src: torch.Tensor, index: torch.Tensor, dim: int = -1,
...
@@ -60,7 +60,7 @@ def scatter_mean(src: torch.Tensor, index: torch.Tensor, dim: int = -1,
index_dim
=
dim
index_dim
=
dim
if
index_dim
<
0
:
if
index_dim
<
0
:
index_dim
=
index_dim
+
src
.
dim
()
index_dim
=
index_dim
+
src
.
dim
()
if
index
.
dim
()
<=
dim
:
if
index
.
dim
()
<=
index_
dim
:
index_dim
=
index
.
dim
()
-
1
index_dim
=
index
.
dim
()
-
1
ones
=
torch
.
ones
(
index
.
size
(),
dtype
=
src
.
dtype
,
device
=
src
.
device
)
ones
=
torch
.
ones
(
index
.
size
(),
dtype
=
src
.
dtype
,
device
=
src
.
device
)
...
...
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