how to load my own images data. and how i can modify this code for loading images. i have 3064 images data,with image dimensions [512x512]
training_data= (15.000,224*224*3)
training_labels= (15.000,)
traindir = os.path.join(args.data, 'train')
  train_dataset = datasets.ImageFolder(
        traindir,
        transforms.Compose([
            transforms.RandomSizedCrop(size[0]), #224 , 299
            transforms.RandomHorizontalFlip(),
            transforms.ToTensor(),
            normalize,
]))
labels = len(train_dataset.classes)

   train_loader = torch.utils.data.DataLoader(
        train_dataset, batch_size=args.batch_size, shuffle=(train_sampler is None),
num_workers=args.workers,  sampler=train_sampler)
    for i, (input, target) in enumerate(train_loader):
        if cuda:
            input, target = input.cuda(async=True), target.cuda(async=True)

        input_var = torch.autograd.Variable(input)
        target_var = torch.autograd.Variable(target)