You’d need to resize everything beforehand and then you can resize it in a batch transform. IE resize everything completely separately and then remove your Resize transform completely from the item_tfms. Everything needs to be the same size for it to work on a batch_tfm
Then just put Resize in the batch_tfms like you have above. What do you mean it won’t resize the image? You mean one_batch() doesn’t return the size you want?
Hi @dipam7, I am using a very similar function to yours and everything seems to be working for me.
See below.
Please disregard the fold logic, as it has nothing to do with your question. I am loading images from a pd.DataFrame in which the training set has been split in multiple folds.
Thank you for the response, I saw a similar example in Fastbook however I did not use aug_transform since it has a lot of other transforms that I did not want and I would have had to turn all of them off. I’ll give it a try though. I have used item_tfms = Resize(size) for now. Let’s see if I can figure out why it’s not working.