I added a line in inference.py to manually accumulate the number of data compared:
correct += pred.cpu().eq(indx_target).sum() # this line already exists
total_pred += len(pred) # new added line
And I tried to calculate accuracy by correct/total_pred.
In this way, the result is about 91%, which seems reasonable. Is this way of calculating correct?
When testing VGG8, the accuracy output is 1805%.
I added a line in inference.py to manually accumulate the number of data compared:
correct += pred.cpu().eq(indx_target).sum() # this line already exists total_pred += len(pred) # new added line
And I tried to calculate accuracy by correct/total_pred. In this way, the result is about 91%, which seems reasonable. Is this way of calculating correct?