fastai2/learner.py
def after_batch(self):
        "Update all metrics and records lr and smooth loss in training"
        if len(self.yb) == 0: return
        mets = self._train_mets if self.training else self._valid_mets
        for met in mets: met.accumulate(self.learn)
        if not self.training: return
        self.lrs.append(self.opt.hypers[-1]['lr'])
        self.losses.append(self.smooth_loss.value)
        self.learn.smooth_loss = self.smooth_loss.value
Update all metrics and records lr and smooth loss in training
Update all metrics and records lr and smooth loss in training
Update all metrics and records lr and smooth loss in training
def after_batch(self):
        if len(self.yb) == 0: return
        mets = self._train_mets if self.training else self._valid_mets
        for met in mets: met.accumulate(self.learn)
        if not self.training: return
        self.lrs.append(self.opt.hypers[-1]['lr'])
        self.losses.append(self.smooth_loss.value)
        self.learn.smooth_loss = self.smooth_loss.value
def after_batch ( self ) : if len ( self . yb ) == 0 : return mets = self . _train_mets if self . training else self . _valid_mets for met in mets : met . accumulate ( self . learn ) if not self . training : return self . lrs . append ( self . opt . hypers [ - 1 ] [ 'lr' ] ) self . losses . append ( self . smooth_loss . value ) self . learn . smooth_loss = self . smooth_loss . value
Update all metrics and records lr and smooth loss in training
Update all metrics and records lr and smooth loss in training
"Update all metrics and records lr and smooth loss in training"
self