def on_train_begin(self, **kwargs): if self.stack_y: self.learn.loss_func = MixUpLoss(self.learn.loss_func)
def on_train_begin(self, **kwargs): "Injects MixupLoss on top of the current loss function." if self.stack_y: self.learn.loss_func = MixUpLoss(self.learn.loss_func)