How to compute the classification accuracy of each class?

After training, one can get the average accuracy on the “val” dataset with " --evaluate" option. May I ask that how to compute the classification accuracy of each class? Thus, one can check to see which class is more difficult to be classified.

you’ll have to manually populate this by changing the code.

Can you explain how classification accuracy is calculated for each class more briefly as I am very new to Pytorch.

I have two classes Positive and Negative and using Transfer Learning.

You can do that by computing the confusion matrix.