Solved by ptrblck in post #2 
              
              
                I think your approach of storing the number of samples in total is valid for your use case. 
Instead of dividing by len(self.test_loader.dataset), just divide by total.