I have a large audio dataset with about 1000 speakers and dozens of utterances per speaker. For the model I’m training I need to sample a largish batch (64) of speakers and then randomly sample 10 utterances per speaker.
I’ve created a Dataset which indexes over the speakers with the __getitem__ method lazily returning the 10 utterances. This works well but is slow between epochs when the dataloader needs to spawn new processes, etc. Since there are only 16 batches per epoch this quickly becomes a large amount of wasted time.
Any recommendations would be appreciated. Thanks!