Skip to content

Commit

Permalink
Fixed 0-elements bug in forward (facebookresearch#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfennhagencab authored Sep 23, 2020
1 parent 8889f08 commit 7cd7895
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def to_tuple(tup):
cur_scores = cur_scores[keep]
cur_classes = cur_classes[keep]
cur_masks = cur_masks[keep]
cur_masks = interpolate(cur_masks[None], to_tuple(size), mode="bilinear").squeeze(0)
cur_masks = interpolate(cur_masks[:, None], to_tuple(size), mode="bilinear").squeeze(1)
cur_boxes = box_ops.box_cxcywh_to_xyxy(cur_boxes[keep])

h, w = cur_masks.shape[-2:]
Expand Down

0 comments on commit 7cd7895

Please sign in to comment.