def print_stats()

in utils/trainer.py [0:0]


    def print_stats(self):
        """
        Prints statistics about the training.
        Statistics are computed on batches since the last print.
        (i.e. if printing every 5 batches then it shows speed on the last 5 batches)
        """
        if self.n_iter % self.params.print_freq != 0:
            return

        s_iter = f"Batch {self.n_iter} - "
        s_stat = ''
        s_stat += ' || '.join([
            '{}: {:7.4f}'.format(k, np.mean(v[-self.params.print_freq:])) for k, v in self.stats.items()
            if type(v) is list and len(v) > 0
        ])

        # learning rates
        s_lr = ""
        s_lr = s_lr + (" - LR: ") + " / ".join("{:.4e}".format(group['lr']) for group in self.optimizer.param_groups)

        # processing speed
        new_time = time.time()
        diff = new_time - self.last_time
        s_speed = "{:7.2f} images/s - ".format(self.stats['processed_i'] * 1.0 / diff)
        self.stats['processed_i'] = 0
        self.last_time = new_time

        # log speed + stats + learning rate
        logger.info(s_iter + s_speed + s_stat + s_lr)