Thanks, I’m not sure I have the same setup. Here’s how my code looks:

  
      github.com
  
  
    asmitapoddar/uncertainty-estimation-DR/blob/master/train.py 196
from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import torchvision
from torchvision import datasets, models, transforms
import matplotlib.pyplot as plt
import time
import os
from PIL import ImageFile
import copy
print("PyTorch Version: ",torch.__version__)
print("Torchvision Version: ",torchvision.__version__)

# Top level data directory. Here we assume the format of the directory conforms to the ImageFolder structure
data_dir = "/home/asmita/DRimages"

# Models to choose from [resnet, alexnet, vgg, squeezenet, densenet, inception]


  This file has been truncated. show original