Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
traveller59 committed Oct 17, 2018
1 parent 57a83cf commit 57af33a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion second/core/target_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def create_target_np(all_anchors,
labels[enable_inds] = 0
bg_inds = np.where(labels == 0)[0]
else:
if len(gt_boxes) == 0:
if len(gt_boxes) == 0 or anchors.shape[0] == 0:
labels[:] = 0
else:
labels[bg_inds] = 0
Expand Down

0 comments on commit 57af33a

Please sign in to comment.