-
-
Notifications
You must be signed in to change notification settings - Fork 655
Closed
Labels
Description
🚀 Feature
Related to discussion from here: Project-MONAI/MONAI#2220 (comment)
The feature request is to support list of tensors or scalars as input for metrics:
a) classification problem:
acc = Accuracy()
output = (
[torch.rand(10), torch.rand(10), torch.rand(10)], # predictions
[4, 5, 1], # ground truth
)
acc.update(output)
print(acc.compute())
b) segmentation problem:
acc = Accuracy()
output = (
[torch.rand(10, 32, 32), torch.rand(10, 40, 30), torch.rand(10, 30, 24)], # predictions
[torch.randint(0, 10, size=(32, 32)), torch.randint(0, 10, size=(40, 30)), torch.randint(0, 10, size=(30, 24))], # ground truth
)
acc.update(output)
print(acc.compute())
c) Same for API with Engine.
cc @Nic-Ma
Nic-Ma, wyli, sdesrozis, trsvchn, KickItLikeShika and 1 more