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
702103ed
Commit
702103ed
authored
May 11, 2021
by
rusty1s
Browse files
fix division by zero
parent
ff285368
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_scatter/composite/std.py
torch_scatter/composite/std.py
+1
-1
No files found.
torch_scatter/composite/std.py
View file @
702103ed
...
...
@@ -34,6 +34,6 @@ def scatter_std(src: torch.Tensor, index: torch.Tensor, dim: int = -1,
if
unbiased
:
count
=
count
.
sub
(
1
).
clamp_
(
1
)
out
=
out
.
div
(
count
).
sqrt
()
out
=
out
.
div
(
count
+
1e-6
).
sqrt
()
return
out
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