File size: 314 Bytes
90f531c
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
#!/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