How to calculate `get_preds` for a large dataset (OOM)

Hi, I’m trying to calculate learn.get_preds for a validation and then a test dataset which both contain ~2000 images of size 1024x1024. learn.get_preds fails on account of running out of memory. How can I calculate these predictions for example just for 1/10th of the dataset?

I am not sure if I can use learn.predict because get_preds uses validate internally and I’m not sure whether the validation transforms are also applied for learn.predict (couldn’t figure it out from the code). Thanks.