Skip to content

Instantly share code, notes, and snippets.

@SubhadityaMukherjee
Created August 13, 2022 07:07
Show Gist options
  • Save SubhadityaMukherjee/8837812746be6415779ed16b626131e3 to your computer and use it in GitHub Desktop.
Save SubhadityaMukherjee/8837812746be6415779ed16b626131e3 to your computer and use it in GitHub Desktop.
predictbatch
def predict_batch(self, item, rm_type_tfms=None, with_input=False): # this bit is slightly complicated. ignore it for now
dl = self.dls.test_dl(item, rm_type_tfms=rm_type_tfms, num_workers=15)
ret = self.get_preds(dl=dl, with_input=False, with_decoded=True)
return ret
Learner.predict_batch = predict_batch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment