How to get confusion matrix in pytorch?
There are 15 classes. I have two tensors, one has the target classes and other has the predicted classes.
How can I get a confusion matrix?

You can try using the sklearn package, given you have your target class y_test and predicted class y_pred.
from sklearn.metrics import confusion_matrix
print(confusion_matrix(y_test, y_pred))

