Solved by ptrblck in post #4 
              
              
                I cannot reproduce this error locally using bool tensors for class_correct or class_total. 
However, based on your code I assume that class_correct is a list containing BoolTensors. 
If that’s the case, you could cast these tensors to float() before dividing them by class_total[i].