Dynamic sampler for data loader

This has been addressed here: https://github.com/pytorch/pytorch/issues/3356