(self, global_step, log_data, time_taken)
return ret
Formats the string to print to stdout based on training information.

        Args:
            log_data (MetricLog): Dict-like object to collect log data for TB writing.
            global_step (int): Global step variable for syncing logs.
            time_taken (float): Time taken for one training iteration.

        Returns:
            str: String to be printed to stdout.
Formats the string to print to stdout based on training information.
Formats the string to print to stdout based on training information .
def print_log(self, global_step, log_data, time_taken):
        """
        Formats the string to print to stdout based on training information.

        Args:
            log_data (MetricLog): Dict-like object to collect log data for TB writing.
            global_step (int): Global step variable for syncing logs.
            time_taken (float): Time taken for one training iteration.

        Returns:
            str: String to be printed to stdout.
        """
        # Basic information
        # log_to_show = [
        #     "INFO: [Epoch {:d}/{:d}][Global Step: {:d}/{:d}]".format(
        #         self._get_epoch(global_step), self.num_epochs, global_step,
        #         self.num_steps)
        # ]
        log_to_show = [
            "INFO: [Global Step: {:d}/{:d}]".format(
                global_step, self.num_steps)
        ]

        # Display GAN information as fed from user.
        GAN_info = [""]
        metrics = sorted(log_data.keys())

        for metric in metrics:
            GAN_info.append('{}: {}'.format(metric, log_data[metric]))

        # Add train step time information
        GAN_info.append("({:.4f} sec/idx)".format(time_taken))

        # Accumulate to log
        log_to_show.append("\n| ".join(GAN_info))

        # Finally print the output
        ret = " ".join(log_to_show)
        print(ret)

        return ret
def print_log ( self , global_step , log_data , time_taken ) : # Basic information # log_to_show = [ #     "INFO: [Epoch {:d}/{:d}][Global Step: {:d}/{:d}]".format( #         self._get_epoch(global_step), self.num_epochs, global_step, #         self.num_steps) # ] log_to_show = [ "INFO: [Global Step: {:d}/{:d}]" . format ( global_step , self . num_steps ) ] # Display GAN information as fed from user. GAN_info = [ "" ] metrics = sorted ( log_data . keys ( ) ) for metric in metrics : GAN_info . append ( '{}: {}' . format ( metric , log_data [ metric ] ) ) # Add train step time information GAN_info . append ( "({:.4f} sec/idx)" . format ( time_taken ) ) # Accumulate to log log_to_show . append ( "\n| " . join ( GAN_info ) ) # Finally print the output ret = " " . join ( log_to_show ) print ( ret ) return ret