I have a
torch.utills.data.Dataset that returns images which slightly vary in size.
I produce my training batches using
torch.utils.data.DataLoader. Is there an inbuilt way to resize the images such that they can be stacked into a batch on the data loader end?
If there’s not, I’ll probably write a
collate_fn to do it. Or is there a better way?
PS: I don’t want to resize my whole dataset to one size. That’s why I’m specifically asking about doing it at a batch level.