I have 3 folders (for example A, B, C) and then every folder has 3 subfolders with the same name (for example sub1, sub2, sub3). Every subfolder contains images and basically every subfolder represents a different class.
I want to create a training data set with these 3 folders and I found ConcatDataset that might work.
So first of all I created 3 different train_datasets using ImageFolder and then I created a list with these 3 train_datasets (lets say that this list has the name all_datasets).
Then in order to create my final training dataset, i used concatdataset
Here is the code:
A_dataset = torchvision.datasets.ImageFolder(root = A_directory , transform = transform) B_dataset = torchvision.datasets.ImageFolder(root = B_directory , transform = transform) C_dataset = torchvision.datasets.ImageFolder(root = C_directory , transform = transform) all_datasets =  all_datasets.append(A_dataset) all_datasets.append(B_dataset) all_datasets.append(C_dataset) final_training_dataset = torch.utils.data.ConcatDataset(all_datasets)
Can anyone explain to me how the format of final_training_dataset is?
I am afraid that it will confuse my classes and thus, I will not have the right labels.
Is there a problem or is everything fine?
Thank you everyone.