def _do_epoch_train(self):
    try:
        self.dl = self.dls.train
        self('begin_train')
        self.all_batches()
    except CancelTrainException:
        self('after_cancel_train')
    finally:
        self('after_train')
def _do_epoch_train(self):
    try:
        self.dl = self.dls.train
        self('begin_train')
        self.all_batches()
    except CancelTrainException:
        self('after_cancel_train')
    finally:
        self('after_train')