未验证 提交 3c561626 编写于 作者: A AddSalt8227 提交者: GitHub

std::max_element in range [first, last) (#1285)

上级 2cf94871
......@@ -204,7 +204,7 @@ static void fast_nms(std::vector<std::vector<Object> >& class_candidates, std::v
for (int j = 1; j < n; j++)
{
std::vector<float>::iterator max_value;
max_value = std::max_element(iou_matrix[j].begin(), iou_matrix[j].begin() + j - 1);
max_value = std::max_element(iou_matrix[j].begin(), iou_matrix[j].begin() + j);
if (*max_value <= iou_thresh)
{
objects.push_back(candidate[j]);
......
......@@ -212,7 +212,7 @@ static void fast_nms(std::vector<std::vector<Object> >& class_candidates, std::v
for (int j = 1; j < n; j++)
{
std::vector<float>::iterator max_value;
max_value = std::max_element(iou_matrix[j].begin(), iou_matrix[j].begin() + j - 1);
max_value = std::max_element(iou_matrix[j].begin(), iou_matrix[j].begin() + j);
if (*max_value <= iou_thresh)
{
objects.push_back(candidate[j]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册