Skip to content

Commit

Permalink
fix metric
Browse files Browse the repository at this point in the history
  • Loading branch information
HaozhiQi committed Dec 26, 2017
1 parent db4ef25 commit ae742e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fpn/core/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def update(self, labels, preds):
num_classes = pred.shape[-1]
# selection of ground truth label is different from softmax or sigmoid classifier
label = label.asnumpy().reshape(-1, ).astype('int32')
fg_inds = np.where(label == 1)[0]
fg_inds = np.where(label > 0)[0]
bg_inds = np.where(label == 0)[0]
self.sum_metric += fg_inds.shape[0]
self.num_inst += (fg_inds.shape[0] + bg_inds.shape[0])
Expand Down

0 comments on commit ae742e2

Please sign in to comment.