Skip to content

Commit 90a0ce5

Browse files
authored
AC: fix one hot encoding (#2998)
1 parent 597d053 commit 90a0ce5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ def update(self, annotation, prediction):
577577

578578
@staticmethod
579579
def one_hot_labels(targets, results):
580-
max_v = max(np.max(targets) + 1, np.max(results) + 1)
580+
max_v = int(max(np.max(targets) + 1, np.max(results) + 1))
581581
gt_bin = np.zeros((len(targets), max_v))
582582
pred_bin = np.zeros((len(targets), max_v))
583583
np.put_along_axis(gt_bin, np.expand_dims(np.array(targets).astype(int), 1), 1, axis=1)

0 commit comments

Comments
 (0)