Thanks for the reply. Using DataLoader is not feasible right now because the images are combined with torchtext objects before training.
I do however have a custom function written to just load the videos in a batch. Say if the batch size is 1, then just that one folder is loaded. Over long term this is slowing down training because the same video ultimately ends up being loaded Z number of times, where Z is the number of epochs. In addition all the validation set videos are downloaded in each validation step.
I am looking into frame subsampling to try to store all data in RAM. That would be the fastest way to solve this issue.