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
134b5c75
"...utils/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "0e5913d523e10e231258e1a4670431e4dab589f0"
Commit
134b5c75
authored
Aug 24, 2020
by
rusty1s
Browse files
fix division for segment_coo_mean when input is of type long
parent
8ec6d0c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
csrc/cuda/segment_coo_cuda.cu
csrc/cuda/segment_coo_cuda.cu
+4
-1
No files found.
csrc/cuda/segment_coo_cuda.cu
View file @
134b5c75
...
@@ -273,7 +273,10 @@ segment_coo_cuda(torch::Tensor src, torch::Tensor index,
...
@@ -273,7 +273,10 @@ segment_coo_cuda(torch::Tensor src, torch::Tensor index,
auto
count
=
arg_out
.
value
();
auto
count
=
arg_out
.
value
();
for
(
int
i
=
dim
+
1
;
i
<
out
.
dim
();
i
++
)
for
(
int
i
=
dim
+
1
;
i
<
out
.
dim
();
i
++
)
count
=
count
.
unsqueeze
(
-
1
);
count
=
count
.
unsqueeze
(
-
1
);
out
.
div_
(
count
);
if
(
out
.
is_floating_point
())
out
.
true_divide_
(
count
);
else
out
.
floor_divide_
(
count
);
}
}
});
});
});
});
...
...
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