To get the highest prediction for a wrong class, you could try to adapt this code and add it to train_model:
max_wrong_logit = -1000.
max_wrong_class = -1
max_wrong_index = -1

for batch_idx, (inputs, labels) in enumerate(dataloaders[phase]):
    # statistics
    running_loss += loss.item() * inputs.size(0)
    running_corrects += torch.sum(preds == labels.data)
    ...

    if phase == 'val':
        wrong_idx = preds != labels
        wrong_logit = torch.max(outputs[wrong_idx])
        if max_wrong_logit < wrong_logit:
            idx = (outputs == wrong_logit).nonzero()
            image_idx = batch_idx * dataloaders[phase].batch_size + idx[0, 0].item()
            pred_class = class_names[idx[0, 1].item()]
            
            max_wrong_logit = wrong_logit
            max_wrong_class = pred_class
            max_wrong_index = image_idx

This will store the image index along with the logit and class name.
The same should also work for the best prediction if you just change the index calculation to preds == labels.
To get a validation set using CIFAR10, you could use a SubsetRandomSampler. @kevinzakka created a nice example here 1.