I have two separate datasets. Each set has 3224224 images. I want to input those datasets into a network as a 6 channel input. Both datasets have the same labels. I want to use Imagefolder for this.
trainset_cort = torchvision.datasets.ImageFolder(root=data_dir_train_cort,
                                transform=transform)

                        
                                          
trainset_slice = torchvision.datasets.ImageFolder(root=data_dir_train_slice,
                                transform=transform)
                                
  

      

trainloader= torch.utils.data.DataLoader(trainset_new
             , 
             batch_size=4,shuffle=True, num_workers=2)



testset_cort = torchvision.datasets.ImageFolder(root=data_dir_val_cort,
                                transform=transform)

                                          
testset_slice = torchvision.datasets.ImageFolder(root=data_dir_val_slice,
                                                 transform=transform)
                                                 


testloader= torch.utils.data.DataLoader(testset_new
             , batch_size=4,shuffle=True, num_workers=2)
             
             

I’m trying above code. i want to create both trainset_new and testset_new as 6 by 224  by 224 imageset