Solved by Amrit_Das in post #2 
              
              
                As per my understanding, I wrote this piece of code. To load images and predict. 
data_transforms = {
    'predict': transforms.Compose([
        transforms.RandomResizedCrop(224),
        transforms.RandomHorizontalFlip(),
        transforms.ToTensor(),
        transforms.Normalize([0.485, 0.456, 0…