Skip to content

Commit

Permalink
update PR curve API usage
Browse files Browse the repository at this point in the history
  • Loading branch information
augray committed Dec 12, 2022
1 parent bea626e commit b20f52c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sematic/examples/mnist/pytorch/train_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test(model: nn.Module, device: torch.device, test_loader: DataLoader):
correct += pred.eq(target).sum().item()

test_loss /= len(test_loader.dataset) # type: ignore
pr_curve = PrecisionRecallCurve(num_classes=10)
pr_curve = PrecisionRecallCurve(num_classes=10, task="multiclass")
precision, recall, thresholds = pr_curve(torch.cat(probas), torch.cat(targets))
classes = []
for i in range(10):
Expand Down

0 comments on commit b20f52c

Please sign in to comment.