From 5d20abba4b8e61c3edb1139bd91e6a9f28627310 Mon Sep 17 00:00:00 2001 From: hejunchao Date: Tue, 26 Sep 2023 14:11:19 +0800 Subject: [PATCH] fix --- tests/compare_util.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/compare_util.py b/tests/compare_util.py index 4db9da9a48..46b1273b61 100644 --- a/tests/compare_util.py +++ b/tests/compare_util.py @@ -25,13 +25,6 @@ def cosine(gt: np.ndarray, pred: np.ndarray, *args): - # gt = np.reshape(gt,-1) - # pred = np.reshape(pred,-1) - # for i in range(gt.size): - # print(gt[i]) - # print() - # for i in range(pred.size): - # print(pred[i]) # remove the NaN values in the same location. if np.isnan(gt).any() and np.isnan(pred).any(): @@ -53,7 +46,7 @@ def cosine(gt: np.ndarray, pred: np.ndarray, *args): if np.isnan(gt).any() or np.isnan(pred).any() or np.isinf(gt).any() or np.isinf(pred).any(): return -1 - # exclude the situation of all zeros in ndarray. + # exclude the situation of all zeros in array. if compare_arrays(gt, pred): return 1