If you want to resize the data in the batch only, one approach would be to apply the Resize operation in the collate_fn or return a list in a custom collate_fn and resize the data in the training loop.
Alternatively, you could also use a BatchSampler, which will pass a batch of indices to Dataset.__getitem__ and resize all images inside the Dataset.