def __log_progress()

in relaxed_adaptive_projection/rap.py [0:0]


    def __log_progress(self, iteration: int = -1) -> None:
        """
        Log the latest iteration statistic values unless an iteration provide
        :param iteration:
        """
        log_iteration = len(self.statistics_l1) - 1 if iteration < 0 else iteration
        statistic_l1 = self.statistics_l1[iteration]
        statistic_max = self.statistics_max[iteration]
        mean_l1 = self.means_l1[iteration]
        mean_max = self.means_max[iteration]
        loss = self.losses[iteration]
        l2_error = self.l2_errors[iteration]
        max_error = self.max_errors[iteration]

        logging.info(
            "Iteration: {}; L1 of statistics: {}; L-Infty of statistics: {}; Means of L1: {}; Max of mean: {}".format(
                log_iteration, statistic_l1, statistic_max, mean_l1, mean_max
            )
        )

        logging.info(
            "Loss: {:.5f}, L2 Error {:.5f} Max Error {:.5f}".format(
                loss, l2_error, max_error
            )
        )