@delegates(GatherPredsCallback.__init__)
def get_preds(self, ds_idx=1, dl=None, with_input=False, with_decoded=False, with_loss=False, act=None, inner=False, **kwargs):
    if (dl is None):
        dl = self.dls[ds_idx].new(shuffled=False, drop_last=False)
    cb = GatherPredsCallback(with_input=with_input, with_loss=with_loss, **kwargs)
    ctx_mgrs = [self.no_logging(), self.added_cbs(cb), self.no_mbar()]
    if with_loss:
        ctx_mgrs.append(self.loss_not_reduced())
    with ExitStack() as stack:
        for mgr in ctx_mgrs:
            stack.enter_context(mgr)
        self((event.begin_epoch if inner else _before_epoch))
        self._do_epoch_validate(dl=dl)
        self((event.after_epoch if inner else _after_epoch))
        if (act is None):
            act = getattr(self.loss_func, 'activation', noop)
        res = cb.all_tensors()
        pred_i = (1 if with_input else 0)
        if (res[pred_i] is not None):
            res[pred_i] = act(res[pred_i])
            if with_decoded:
                res.insert((pred_i + 2), getattr(self.loss_func, 'decodes', noop)(res[pred_i]))
        return tuple(res)
@delegates(GatherPredsCallback.__init__)
def get_preds(self, ds_idx=1, dl=None, with_input=False, with_decoded=False, with_loss=False, act=None, inner=False, **kwargs):
    if (dl is None):
        dl = self.dls[ds_idx].new(shuffled=False, drop_last=False)
    cb = GatherPredsCallback(with_input=with_input, with_loss=with_loss, **kwargs)
    ctx_mgrs = [self.no_logging(), self.added_cbs(cb), self.no_mbar()]
    if with_loss:
        ctx_mgrs.append(self.loss_not_reduced())
    with ExitStack() as stack:
        for mgr in ctx_mgrs:
            stack.enter_context(mgr)
        self((event.begin_epoch if inner else _before_epoch))
        self._do_epoch_validate(dl=dl)
        self((event.after_epoch if inner else _after_epoch))
        if (act is None):
            act = getattr(self.loss_func, 'activation', noop)
        res = cb.all_tensors()
        pred_i = (1 if with_input else 0)
        if (res[pred_i] is not None):
            res[pred_i] = act(res[pred_i])
            if with_decoded:
                res.insert((pred_i + 2), getattr(self.loss_func, 'decodes', noop)(res[pred_i]))
        return tuple(res)