question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ConfusionMatrix is extremely slow

See original GitHub issue

I’m trying to do some grid search on some thresholds for the labels of my models, and the computation of 580 confusion matrices takes about 22 minutes on the GPU and about 8 minutes on CPU (yes, it is slower on the GPU).

I think the issue is probably related to torch.bincount

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
miguelvrcommented, Dec 10, 2019
CPU benchmarks
sklearn cm: 0.004323482513427734
ignite cm: 0.0011348721981048583
binary cm: 0.0009120926856994629

GPU benchmarks
ignite cm: 0.00042329788208007814
binary cm: 0.000345123291015625
1reaction
miguelvrcommented, Dec 9, 2019

I’m putting together a small-ish code snippet with the benchmarks, I’ll get back to you ASAP

Read more comments on GitHub >

github_iconTop Results From Across the Web

Faster method of computing confusion matrix? - Stack Overflow
Is there a faster approach (in PyTorch) to efficiently calculate the confusion matrix for a sample of inputs for image semantic segmentation?
Read more >
Re-scaling a confusion matrix after down sampling one class
... model on the full dataset, which would be extremely slow. I was thinking of doing a naive re-scaling of the confusion matrix,...
Read more >
Function `confusion_matrix ` in MLJ always fails
Hello, I try to caculate a confusion matrix in Julia, but I meet some ERROR and it is hard for me to debug,...
Read more >
Confusion Matrix — Clearly Explained | by Indhumathy Chelliah
In machine learning, the confusion matrix helps to summarize the performance of classification models. From the confusion matrix, ...
Read more >
Understanding Confusion Matrix in less confusing way - Medium
So, here comes the role of Recall, Precision, Fall out and other performance evaluation criterion. Recall or True Positive Rate (TPR) : It ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found