Accuracy calculation issue related to "+="
pytorch-lightning/pytorch_lightning/metrics/classification/accuracy.py
    
    
         Line 98
      in
      c208ac6
    
  
  
    

        
          
           self.correct += torch.sum(preds == target) 
        
    
  


I encountered RuntimeError: Trying to pass too many CPU scalars to CUDA kernel! error when using the accuracy metric.
This might be related to:
https://discuss.pytorch.org/t/trying-to-pass-too-many-cpu-scalars-to-cuda-kernel/87757/5
pytorch/pytorch#40986