Filter learn.data.train_dl at epoch begin

I think what you want is called a sampler (from PyTorch, not fastai), to only loop through certain elements of your dataset. You can pass one after creating your data with:

data.train_dl = data>train_dl.new(shuffle=False, sampler=my_sampler)
3 Likes