basic_utils/utils.py
def add_update_info(self, u):
        """
        Save the information from updating.

        Args:
            u: the updating information
        """
        if u is not None:
            for d in u:
                if d[0] not in self.u_stats:
                    self.u_stats[d[0]] = defaultdict(list)
                for k in d[1]:
                    if k[-7:] == '_before':
                        prefix = '_before'
                    elif k[-6:] == '_after':
                        prefix = '_after'
                    else:
                        prefix = ''
                    self.writer.add_scalar('update_data' + prefix + '/' + d[0] + '_' + k, d[1][k], self.step_counter)
                    self.u_stats[d[0]][k].append(d[1][k])
            self.step_counter += 1

        Save the information from updating.

        Args:
            u: the updating information
        
Save the information from updating.
Save the information from updating .
def add_update_info(self, u):
        if u is not None:
            for d in u:
                if d[0] not in self.u_stats:
                    self.u_stats[d[0]] = defaultdict(list)
                for k in d[1]:
                    if k[-7:] == '_before':
                        prefix = '_before'
                    elif k[-6:] == '_after':
                        prefix = '_after'
                    else:
                        prefix = ''
                    self.writer.add_scalar('update_data' + prefix + '/' + d[0] + '_' + k, d[1][k], self.step_counter)
                    self.u_stats[d[0]][k].append(d[1][k])
            self.step_counter += 1
def add_update_info ( self , u ) : if u is not None : for d in u : if d [ 0 ] not in self . u_stats : self . u_stats [ d [ 0 ] ] = defaultdict ( list ) for k in d [ 1 ] : if k [ - 7 : ] == '_before' : prefix = '_before' elif k [ - 6 : ] == '_after' : prefix = '_after' else : prefix = '' self . writer . add_scalar ( 'update_data' + prefix + '/' + d [ 0 ] + '_' + k , d [ 1 ] [ k ] , self . step_counter ) self . u_stats [ d [ 0 ] ] [ k ] . append ( d [ 1 ] [ k ] ) self . step_counter += 1
Save the information from updating.
Save the information from updating .
"""
        Save the information from updating.

        Args:
            u: the updating information
        """
self
u
the updating information
the updating information