How to create ROC Curve for Resnet NN

Hi, trying to take the resnet50 model I have defined in PyTorch and generate an ROC curve-unsure of what to insert code-wise to generate the data for an ROC curve

for epoch in range(3): 
    running_loss = 0.0
    for i, data in enumerate(trainloader_aug, 0):
        
        inputs, labels = data
        inputs, labels = Variable(inputs.cuda()), Variable(labels.cuda())
        optimizer.zero_grad()
        outputs = (net(inputs)).cuda()
        loss = criterion(outputs, labels)
        loss.backward()        
        optimizer.step()

        running_loss += loss.data[0]
        if i % 10 == 9: # print every 2000 mini-batches
            print('[%d, %5d] loss: %.3f' % (epoch+1, i+1, running_loss / 1000))
            running_loss = 0.0

    correct = 0
    total = 0    
    for data in testloader:
        images, labels = data
        images = images.cuda()
        labels = labels.cuda()
        outputs = net(Variable(images)) 
        outputs = outputs.cuda()
        _, predicted = torch.max(outputs.data, 1)
        total += labels.size(0)
        correct += (predicted == labels).sum()
      

I would greatly appreciate some assistance with this. Thank you.

You could use the sklearn.metrics.roc_curve example and adapt the code to use the targets and predictions for the ROC curves.