Hi!
My Data Loader :
LoadData(Dataset):
    def __init__(self, ..., ...., ...):
        self.ns = (640, 640)
        .....
        .....

   def __getitem__(index):
       img = resize(img[index], self.ns)
       .....
       .....
       return img

   def set_size(self, ns):
       self.ns = ns

And the training loop
for img in dataiterator:
    forward(img)
    backward()
    datatiterator.dataset.set_size(new_ns)

I would like to resize images dynamically after each iteration. When I do it as above, it does not work. Is there any simple trick to do that? Please help.
Best,