PyTorch - How to use k-fold cross validation when the data is loaded through ImageFolder?
My data, which is images, is stored on the filesystem, and it is fed into my convolutional neural network through the ImageFolder data loader of PyTorch. Therefore, the training, validation, and test data is manually splitted into different folders on the filesystem. So, how can I apply k-fold cross validation when using ImageFolder?

You can merge the fixed train/val/test folds you currently have using data.ConcatDataset into a single Dataset. Then you can use data.Subset to randomly split the single dataset into different folds over and over.
