I trying to save the predictions for the state Form competition. I’ve got everything except the image files to attach the right column of the predictions.
in below snapshot i have copied the code from Part1 v1 notebook but i need the test_filenames array filed with fille names.
so question is how do i get the image names via fastai library? I can of course read from the directory but I fear they might have a different listing order than what the fastai library has read.
Another question in Lesson 2 there is this line which fetches next mini batch.
x,y = next(iter(data.val_dl))
But if this fetches only one next mini batch, wont we need a loop to iterate through all the batches? how can it loop through all batches with just one “next” call?