From 0b178b8a598cc0a3a9d4f834f06399bcaa106437 Mon Sep 17 00:00:00 2001 From: wanghaox Date: Mon, 22 Jan 2018 17:40:46 +0800 Subject: [PATCH] update code --- paddle/operators/iou_similarity_op.cu | 3 ++- paddle/operators/iou_similarity_op.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/operators/iou_similarity_op.cu b/paddle/operators/iou_similarity_op.cu index c270167e117..526edaefeea 100755 --- a/paddle/operators/iou_similarity_op.cu +++ b/paddle/operators/iou_similarity_op.cu @@ -18,4 +18,5 @@ limitations under the License. */ namespace ops = paddle::operators; REGISTER_OP_CUDA_KERNEL( iou_similarity, - ops::IOUSimilarityKernel); + ops::IOUSimilarityKernel, + ops::IOUSimilarityKernel); diff --git a/paddle/operators/iou_similarity_op.h b/paddle/operators/iou_similarity_op.h index 45bef2f7eec..fa1b60ae34e 100644 --- a/paddle/operators/iou_similarity_op.h +++ b/paddle/operators/iou_similarity_op.h @@ -46,7 +46,7 @@ struct IOUSimilarityFunctor { T y_min1 = x_[row_id * 4 + 1]; T x_max1 = x_[row_id * 4 + 2]; 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 y_min2 = y_[i * 4 + 1]; T x_max2 = y_[i * 4 + 2]; -- GitLab