title: How do I calculate the confusion matrix in PyTorch efficiently?
body: <p>I have a tensor that contains my predictions and a tensor that contains the actual labels for my binary classification problem. How can I calculate the confusion matrix efficiently?</p>