Commit 308bfa38 authored by Juha Reunanen's avatar Juha Reunanen Committed by Davis E. King

MMOD: fix loss from ignored rects when using loss_per_missed_target != 1 (#813)

parent ef57efc7
......@@ -757,7 +757,7 @@ namespace dlib
if(image_rect_to_feat_coord(p, input_tensor, x, x.label, sub, k))
{
// Ignore boxes that can't be detected by the CNN.
loss -= 1;
loss -= options.loss_per_missed_target;
continue;
}
const size_t idx = (k*output_tensor.nr() + p.y())*output_tensor.nc() + p.x();
......@@ -769,7 +769,7 @@ namespace dlib
else
{
// This box was ignored so shouldn't have been counted in the loss.
loss -= 1;
loss -= options.loss_per_missed_target;
truth_idxs.push_back(0);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment