How to del or re-init Dataloader?

I need to validate the train model with dynamic input size.
But the size I need test is not fixed.
So I want to re-init the Dataloader before I test?
Does it have a way to do this safely?

I think you can just re-initialize the Dataset and the DataLoader and change the size in transforms (assuming working with images?), or is there any particular reason you think this is not a good idea?

Yeah I think I could change transform before a new epoch start.That’s work.