How to force DataLoader to use same random crop dimensions for image dataset?

I am currently running a program that resamples data based on pseudo-labels for image patches. I give those pseudo-labels to a sampler to be used for balancing a resampled dataset. However, I want the dataloader to return the same randomly sampled image patch as before resampling, instead of a new random patch. Is there a way to do this within a dataloader? @ptrblck