(self, lr, step, train_stats=None, valid_stats=None)
See base class method `ReportMgrBase.report_step`.
See base class method `ReportMgrBase.report_step`.
See base class method ReportMgrBase . report_step .
def _report_step(self, lr, step, train_stats=None, valid_stats=None):
        """
        See base class method `ReportMgrBase.report_step`.
        """
        if train_stats is not None:
            self.log('Train perplexity: %g' % train_stats.ppl())
            self.log('Train accuracy: %g' % train_stats.accuracy())

            self.maybe_log_tensorboard(train_stats,
                                       "train",
                                       lr,
                                       step)

        if valid_stats is not None:
            self.log('Validation perplexity: %g' % valid_stats.ppl())
            self.log('Validation accuracy: %g' % valid_stats.accuracy())

            self.maybe_log_tensorboard(valid_stats,
                                       "valid",
                                       lr,
                                       step)
def _report_step ( self , lr , step , train_stats = None , valid_stats = None ) : if train_stats is not None : self . log ( 'Train perplexity: %g' % train_stats . ppl ( ) ) self . log ( 'Train accuracy: %g' % train_stats . accuracy ( ) ) self . maybe_log_tensorboard ( train_stats , "train" , lr , step ) if valid_stats is not None : self . log ( 'Validation perplexity: %g' % valid_stats . ppl ( ) ) self . log ( 'Validation accuracy: %g' % valid_stats . accuracy ( ) ) self . maybe_log_tensorboard ( valid_stats , "valid" , lr , step )