提交 0b178b8a 编写于 作者: W wanghaox

update code

上级 3c255ad3
...@@ -18,4 +18,5 @@ limitations under the License. */ ...@@ -18,4 +18,5 @@ limitations under the License. */
namespace ops = paddle::operators; namespace ops = paddle::operators;
REGISTER_OP_CUDA_KERNEL( REGISTER_OP_CUDA_KERNEL(
iou_similarity, iou_similarity,
ops::IOUSimilarityKernel<paddle::platform::CUDADeviceContext, float>); ops::IOUSimilarityKernel<paddle::platform::CUDADeviceContext, float>,
ops::IOUSimilarityKernel<paddle::platform::CUDADeviceContext, double>);
...@@ -46,7 +46,7 @@ struct IOUSimilarityFunctor { ...@@ -46,7 +46,7 @@ struct IOUSimilarityFunctor {
T y_min1 = x_[row_id * 4 + 1]; T y_min1 = x_[row_id * 4 + 1];
T x_max1 = x_[row_id * 4 + 2]; T x_max1 = x_[row_id * 4 + 2];
T y_max1 = x_[row_id * 4 + 3]; T y_max1 = x_[row_id * 4 + 3];
for (int i = 0; i < cols_; ++i) { for (size_t i = 0; i < cols_; ++i) {
T x_min2 = y_[i * 4]; T x_min2 = y_[i * 4];
T y_min2 = y_[i * 4 + 1]; T y_min2 = y_[i * 4 + 1];
T x_max2 = y_[i * 4 + 2]; T x_max2 = y_[i * 4 + 2];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册