diff --git a/lite/kernels/host/matrix_nms_compute.cc b/lite/kernels/host/matrix_nms_compute.cc index 74d155c18f3e1097b499e875d2475007cf377538..b5c381e3f91df2cb20bf8317f3b430c373b42567 100644 --- a/lite/kernels/host/matrix_nms_compute.cc +++ b/lite/kernels/host/matrix_nms_compute.cc @@ -274,7 +274,7 @@ void MatrixNmsCompute::Run() { Tensor boxes_slice, scores_slice; size_t num_out = 0; - std::vector offsets = {0}; + std::vector offsets = {0}; std::vector detections; std::vector indices; detections.reserve(out_dim * num_boxes * batch_size); @@ -298,10 +298,10 @@ void MatrixNmsCompute::Run() { post_threshold, use_gaussian, gaussian_sigma); - offsets.push_back(offsets.back() + num_out); + offsets.push_back(offsets.back() + static_cast(num_out)); } - size_t num_kept = offsets.back(); + uint64_t num_kept = offsets.back(); if (num_kept == 0) { outs->Resize({0, out_dim}); index->Resize({0, 1});