How to calculate class accuracy in multi label problem

hi,
i have a multi label problem, and i want to calculate the accuracy for each class
i have a cnn model
how can i do it with pytorch?

You could calculate the confusion matrix and calculate the per-class accuracy and other metrics.
Once you have the predictions and targets, you could use e.g. sklearn.metrics for it or implement it from scratch (we have some posts in this forum on how to calculate a confusion matrix and other metrics based on it).