Correct me if I am wrong, but doesn’t this code seem unnecessarily bulky ? Defining 3 classes for sampling seems to be an overkill: sampler, batch_sampler, and dataLoader.
I am not sure if the api allows it but can’t we sample from the loader using something as simple as: loader.get(indices) ? is there a performance gain from creating the above 3 objects ?