def on_train_begin(self, **kwargs):
     if self.stack_y: self.learn.loss_func = MixUpLoss(self.learn.loss_func)
Пример #2
0
 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)