From f8c8538f17df6dfc1923fa502d578fbafe470236 Mon Sep 17 00:00:00 2001 From: Wangzheee <634486483@qq.com> Date: Fri, 11 Sep 2020 14:40:38 +0800 Subject: [PATCH] Update matrix_nms_compute.cc --- lite/kernels/host/matrix_nms_compute.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lite/kernels/host/matrix_nms_compute.cc b/lite/kernels/host/matrix_nms_compute.cc index 74d155c18f..b5c381e3f9 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}); -- GitLab