Next iter gives same batch

x,y = next(iter(md.test_dl))

This keeps on giving me the same batch ,when i re run. I though it would give the new batch…
How to retrieve the subsequent batch of images with this…

you have to do

a=iter(md.test_dl)
x,y=next(a)

otherwise it creates a new iter everytime meaning you are always starting over and getting the same batch.

1 Like

thanks a lot…
May i ask you for some more help…
i m strugging to improve the public lb score for one of the kaggle competition airbus that is segmentation problem…
I used Fast ai unet of last year ,increased the resolution of unet model as well but it it is not helping…
I m not sure if m missing on any image pre processing of satellite image for it learn better.