Esempio n. 1
0
    def __call__(self, x):

        if not hasattr(x, "parents"):
            x.parents = []

        self.load_model(parents=x.parents)
        preds = util_checkpoint(self.model,
                                x) if self.checkpoint else self.model(x)
        preds.parents = x.parents + ([self])
        return preds
Esempio n. 2
0
 def __call__(self, x):
     self.load_model()
     preds = util_checkpoint(self.model,
                             x) if self.checkpoint else self.model(x)
     preds.task = self.dest_task
     return preds