Skip to content

Commit

Permalink
Merge branch 'master' into update-pytorch-vesion
Browse files Browse the repository at this point in the history
  • Loading branch information
vfdev-5 authored Feb 17, 2025
2 parents 05b6263 + f979acb commit 23d0de8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ignite/metrics/test_confusion_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_miou():

res = iou_metric.compute().numpy()

assert res == true_res_
assert pytest.approx(res) == true_res_

for ignore_index in range(3):
cm = ConfusionMatrix(num_classes=3)
Expand All @@ -271,7 +271,7 @@ def test_miou():
cm.update(output)
res = iou_metric.compute().numpy()
true_res_ = np.mean(true_res[:ignore_index] + true_res[ignore_index + 1 :])
assert res == true_res_, f"{ignore_index}: {res} vs {true_res_}"
assert pytest.approx(res) == true_res_, f"{ignore_index}: {res} vs {true_res_}"


def test_cm_accuracy():
Expand Down

0 comments on commit 23d0de8

Please sign in to comment.