For this you would have to create/modify a data loader class.
You can have a look at this tutorial - Data Loading and Processing Tutorial 108
I’ve modified the code from the tutorial to reflect something like you have asked below
class ImageDataset(Dataset):

    def __init__(self, csv_file, root_dir, transform=None):
        """
        Args:
            csv_file (string): Path to the csv file with annotations.
            root_dir (string): Directory with all the images.
            transform (callable, optional): Optional transform to be applied
                on a sample.
        """
        self.imgs_frame = pd.read_csv(csv_file)
        self.root_dir = root_dir
        self.transform = transform

    def __len__(self):
        return len(self.landmarks_frame)

    def __getitem__(self, idx):
        img_name = os.path.join(self.root_dir,
                                self.imgs_frame.iloc[idx, 0])
        im = cv2.imread('img.jpg').reshape((1, 1, 3))
        im2 = cv2.resize(im, (448, 448))
        im = im.transpose((1, 2, 0)).reshape((1, 3, 224, 224))
        im2 = im2.transpose((1, 2, 0)).reshape((1, 3, 448, 448))
        label = self.imgs_frame.iloc[idx, 1:].as_matrix()
        if self.transform:
            im = self.transform(im)
            im2 = self.transform(im2)

        return im1, im2, label