Could you post a small example?
As far as I understand you have to tensors, one with bad predictions and the other with good ones.
Both tensors just contain zeros and ones and now you would like to calculate the ratio?
good_pred = torch.empty(100).random_(2)

(good_pred==0).float().sum() / good_pred.size(0)
(good_pred==1).float().sum() / good_pred.size(0)