Commit 702103ed authored by rusty1s's avatar rusty1s
Browse files

fix division by zero

parent ff285368
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment