2de47a11683658e4a5fb70b8e98e8c99983605ec,test/test_metrics.py,TestMeanIoU,test_four_classes_2d_perfect,#TestMeanIoU#,36
Before Change
mean_iou = tgm.metrics.mean_iou(predicted, actual, num_classes)
assert mean_iou.shape == (1, num_classes)
assert pytest.approx(mean_iou[..., 0].item(), 1.00)
assert pytest.approx(mean_iou[..., 1].item(), 1.00)
assert pytest.approx(mean_iou[..., 2].item(), 1.00)
assert pytest.approx(mean_iou[..., 3].item(), 1.00)
def test_four_classes_2d_one_class_no_predicted(self):
After Change
[2, 2, 3, 3]]])
mean_iou = tgm.metrics.mean_iou(predicted, actual, num_classes)
mean_iou_real = torch.tensor(
[[1.0, 1.0, 1.0, 1.0]], dtype=torch.float32)
assert mean_iou.shape == (batch_size, num_classes)
assert utils.check_equal_torch(mean_iou, mean_iou_real)
def test_four_classes_2d_one_class_no_predicted(self):
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 6
Instances
Project Name: arraiy/torchgeometry
Commit Name: 2de47a11683658e4a5fb70b8e98e8c99983605ec
Time: 2019-03-26
Author: edgar.riba@gmail.com
File Name: test/test_metrics.py
Class Name: TestMeanIoU
Method Name: test_four_classes_2d_perfect
Project Name: arraiy/torchgeometry
Commit Name: 2de47a11683658e4a5fb70b8e98e8c99983605ec
Time: 2019-03-26
Author: edgar.riba@gmail.com
File Name: test/test_metrics.py
Class Name: TestMeanIoU
Method Name: test_four_classes_2d_perfect
Project Name: arraiy/torchgeometry
Commit Name: 5829b0bf68af17522f89b52ea6ac3422e8a3d77b
Time: 2019-03-26
Author: edgar.riba@gmail.com
File Name: test/test_metrics.py
Class Name: TestConfusionMatrix
Method Name: test_two_classes
Project Name: arraiy/torchgeometry
Commit Name: 2de47a11683658e4a5fb70b8e98e8c99983605ec
Time: 2019-03-26
Author: edgar.riba@gmail.com
File Name: test/test_metrics.py
Class Name: TestMeanIoU
Method Name: test_two_classes
Project Name: arraiy/torchgeometry
Commit Name: 2de47a11683658e4a5fb70b8e98e8c99983605ec
Time: 2019-03-26
Author: edgar.riba@gmail.com
File Name: test/test_metrics.py
Class Name: TestMeanIoU
Method Name: test_four_classes_2d_one_class_no_predicted
Project Name: arraiy/torchgeometry
Commit Name: 2de47a11683658e4a5fb70b8e98e8c99983605ec
Time: 2019-03-26
Author: edgar.riba@gmail.com
File Name: test/test_metrics.py
Class Name: TestMeanIoU
Method Name: test_two_classes_perfect