(self, step, num_steps, learning_rate, start)
Write out statistics to stdout.

        Args:
           step (int): current step
           n_batch (int): total batches
           start (int): start time of step.
Write out statistics to stdout.
Write out statistics to stdout .
def output(self, step, num_steps, learning_rate, start):
        """Write out statistics to stdout.

        Args:
           step (int): current step
           n_batch (int): total batches
           start (int): start time of step.
        """
        t = self.elapsed_time()
        logger.info(
            ("Step %2d/%5d; acc: %6.2f; ppl: %5.2f; xent: %4.2f; " +
             "lr: %7.5f; %3.0f/%3.0f tok/s; %6.0f sec")
            % (step, num_steps,
               self.accuracy(),
               self.ppl(),
               self.xent(),
               learning_rate,
               self.n_src_words / (t + 1e-5),
               self.n_words / (t + 1e-5),
               time.time() - start))
        sys.stdout.flush()
def output ( self , step , num_steps , learning_rate , start ) : t = self . elapsed_time ( ) logger . info ( ( "Step %2d/%5d; acc: %6.2f; ppl: %5.2f; xent: %4.2f; " + "lr: %7.5f; %3.0f/%3.0f tok/s; %6.0f sec" ) % ( step , num_steps , self . accuracy ( ) , self . ppl ( ) , self . xent ( ) , learning_rate , self . n_src_words / ( t + 1e-5 ) , self . n_words / ( t + 1e-5 ) , time . time ( ) - start ) ) sys . stdout . flush ( )