Elf_encoder / src /ae_misc.py
thomaswarford's picture
Upload 77 files
90f531c verified
raw
history blame
314 Bytes
#!/usr/bin/env python
"""
Miscallenous functions for autoencoders
"""
def predict(learn, item, rm_type_tfms=None, with_input=False):
dl = learn.dls.test_dl([item], rm_type_tfms=rm_type_tfms, num_workers=0)
inp,preds,_,dec_preds = learn.get_preds(dl=dl, with_input=True, with_decoded=True)
return preds