(self, log_data, global_step)
return log_data
Takes a step for updating learning rate and updates the input log_data
        with the current status.

        Args:
            log_data (MetricLog): Object for logging the updated learning rate metric.
            global_step (int): The current global step of the training.

        Returns:
            MetricLog: MetricLog object containing the updated learning rate at the current global step.
Takes a step for updating learning rate and updates the input log_data
        with the current status.
Takes a step for updating learning rate and updates the input log_data with the current status .
def step(self, log_data, global_step):
        """
        Takes a step for updating learning rate and updates the input log_data
        with the current status.

        Args:
            log_data (MetricLog): Object for logging the updated learning rate metric.
            global_step (int): The current global step of the training.

        Returns:
            MetricLog: MetricLog object containing the updated learning rate at the current global step.
        """
        if self.lr_decay == "linear":
            lr_D = self.linear_decay(optimizer=self.optD,
                                     global_step=global_step,
                                     lr_value_range=(self.lr_D, 0.0),
                                     lr_step_range=(0, self.num_steps))

            lr_G = self.linear_decay(optimizer=self.optG,
                                     global_step=global_step,
                                     lr_value_range=(self.lr_G, 0.0),
                                     lr_step_range=(0, self.num_steps))

        elif self.lr_decay in [None, "None"]:
            lr_D = self.lr_D
            lr_G = self.lr_G

        else:
            raise ValueError("Invalid lr_decay method {} selected.".format(
                self.lr_decay))

        # Update metrics log
        log_data.add_metric('lr_D', lr_D, group='lr', precision=6)
        log_data.add_metric('lr_G', lr_G, group='lr', precision=6)

        return log_data
def step ( self , log_data , global_step ) : if self . lr_decay == "linear" : lr_D = self . linear_decay ( optimizer = self . optD , global_step = global_step , lr_value_range = ( self . lr_D , 0.0 ) , lr_step_range = ( 0 , self . num_steps ) ) lr_G = self . linear_decay ( optimizer = self . optG , global_step = global_step , lr_value_range = ( self . lr_G , 0.0 ) , lr_step_range = ( 0 , self . num_steps ) ) elif self . lr_decay in [ None , "None" ] : lr_D = self . lr_D lr_G = self . lr_G else : raise ValueError ( "Invalid lr_decay method {} selected." . format ( self . lr_decay ) ) # Update metrics log log_data . add_metric ( 'lr_D' , lr_D , group = 'lr' , precision = 6 ) log_data . add_metric ( 'lr_G' , lr_G , group = 'lr' , precision = 6 ) return log_data