Skip to content

Commit 31b7c62

Browse files
authored
AC: fix labels binarization for profiling (#3049)
1 parent 724c483 commit 31b7c62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/accuracy_checker/openvino/tools/accuracy_checker/metrics/classification.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ def binarize_labels(self):
208208
gt_bin = np.zeros((len(self.gt), max_v))
209209
pred_bin = np.zeros((len(self.pred), max_v))
210210
np.put_along_axis(gt_bin, np.expand_dims(np.array(self.gt).astype(int), 1), 1, axis=1)
211-
np.put_along_axis(pred_bin, np.expand_dims(np.array(self.pred).astype(int), 1), 1, axis=1)
211+
for top in np.transpose(self.pred, (1, 0)):
212+
np.put_along_axis(
213+
pred_bin, np.expand_dims(top.astype(int), 1), 1, axis=1)
212214
return gt_bin, pred_bin
213215

214216
def roc(self, y_true, y_score):

0 commit comments

Comments
 (0)