Solved by ptrblck in post #4 
              
              
                You could probably write a custom sampler, which could yield the data indices based on the condition of the data length, but I’m not sure how complicated that would be. 
Maybe the easier approach is to create separate DataLoaders, one for each length, use their iterators, and call randomly next on t…