Calculating accuracy for a multi-label classification problem ...
discuss.pytorch.org › t › calculating-accuracy-for-aApr 26, 2017 · I used CrossEntropyLoss before in a single-label classification problem and then I could calculate the accuracy like this: _, predicted = torch.max(classified_labels.data, 1) total = len(labels) correct = (predicted == labels).sum() accuracy = 100 * correct / total Now I am trying to move on to a multi-label classification problem using MultiLabelMarginLoss or MultiLabelSoftMarginLoss (is this the right equivalent to choose?), I am unsure how to calculate the accuracy of classified_labels?