Deb_Prakash_Chatterj:

fpr[i], tpr[i], _ = roc_curve(labels[i], prediction[i]) # here change y_test to labels


In that function, you have to use roc_curve(labels.view(-1).cpu(), prediction.view(-1).cpu())