Solved by ptrblck in post #9 
              
              
                Sure, I didn’t mean it will always be an int, but still can be an integer. 
Using your code to create a small code snippet works fine: 
N = 50000
running_correct = 0.0
running_correct += torch.sum(torch.randint(0, 2, (N,)) == torch.randint(0, 2, (N,)))
running_correct /= N
print(100*running_correct)…