-
Notifications
You must be signed in to change notification settings - Fork 715
Open
Description
Hi,
In the forward path of the MultiBoxLoss() class the amount of present ground truth boxes in every image is calculated:
n_objects = boxes[i].size(0)
overlap = find_jaccard_overlap(boxes[i],self.priors_xy) # (n_objects, 8732)
# For each prior, find the object that has the maximum overlap
overlap_for_each_prior, object_for_each_prior = overlap.max(dim=0) # (8732)
When I try to calculate the loss for images w/o any objects, this throws the following error:
IndexError: max(): Expected reduction dim 0 to have non-zero size.
I guess the current code doesn't work for a training dataset that contains empty images, right?
The used dataset for this tutorial (PascalVOCDataset) doesn't cover that case.
Metadata
Metadata
Assignees
Labels
No labels