yolox/core/trainer.py
def after_iter(self):
        """
        `after_iter` contains two parts of logic:
            * log information
            * reset setting of resize
        """
        # log needed information
        if (self.iter + 1) % self.exp.print_interval == 0:
            left_iters = self.max_iter * self.max_epoch - (self.progress_in_iter + 1)
            eta_seconds = self.meter["iter_time"].global_avg * left_iters
            eta_str = "ETA: {}".format(datetime.timedelta(seconds=int(eta_seconds)))

            progress_str = "epoch: {}/{}, iter: {}/{}".format(
                self.epoch + 1, self.max_epoch, self.iter + 1, self.max_iter
            )
            loss_meter = self.meter.get_filtered_meter("loss")
            loss_str_list = []
            for k, v in loss_meter.items():
                single_loss_str = "{}: {:.1f}".format(k, float(v.latest))

                loss_str_list.append(single_loss_str)

            loss_str = ", ".join(loss_str_list)

            time_meter = self.meter.get_filtered_meter("time")
            time_str = ", ".join([
                "{}: {:.3f}s".format(k, float(v.avg))
                for k, v in time_meter.items()
            ])

            logger.info(
                "{}, {}, {}, lr: {:.3e}".format(
                    progress_str,
                    time_str,
                    loss_str,
                    self.meter["lr"].latest,
                )
                + (", size: {:d}, {}".format(self.input_size[0], eta_str))
            )
            self.meter.clear_meters()

        # random resizing
        if self.exp.random_size is not None and (self.progress_in_iter + 1) % 10 == 0:
            self.input_size = self.exp.random_resize(
                self.train_loader, self.epoch, self.rank, self.is_distributed
            )

        `after_iter` contains two parts of logic:
            * log information
            * reset setting of resize
        
`after_iter` contains two parts of logic:
log information
reset setting of resize
` after_iter ` contains two parts of logic : log information reset setting of resize
def after_iter(self):
        if (self.iter + 1) % self.exp.print_interval == 0:
            left_iters = self.max_iter * self.max_epoch - (self.progress_in_iter + 1)
            eta_seconds = self.meter["iter_time"].global_avg * left_iters
            eta_str = "ETA: {}".format(datetime.timedelta(seconds=int(eta_seconds)))
            progress_str = "epoch: {}/{}, iter: {}/{}".format(
                self.epoch + 1, self.max_epoch, self.iter + 1, self.max_iter
            )
            loss_meter = self.meter.get_filtered_meter("loss")
            loss_str_list = []
            for k, v in loss_meter.items():
                single_loss_str = "{}: {:.1f}".format(k, float(v.latest))
                loss_str_list.append(single_loss_str)
            loss_str = ", ".join(loss_str_list)
            time_meter = self.meter.get_filtered_meter("time")
            time_str = ", ".join([
                "{}: {:.3f}s".format(k, float(v.avg))
                for k, v in time_meter.items()
            ])
            logger.info(
                "{}, {}, {}, lr: {:.3e}".format(
                    progress_str,
                    time_str,
                    loss_str,
                    self.meter["lr"].latest,
                )
                + (", size: {:d}, {}".format(self.input_size[0], eta_str))
            )
            self.meter.clear_meters()
        if self.exp.random_size is not None and (self.progress_in_iter + 1) % 10 == 0:
            self.input_size = self.exp.random_resize(
                self.train_loader, self.epoch, self.rank, self.is_distributed
            )
def after_iter ( self ) : if ( self . iter + 1 ) % self . exp . print_interval == 0 : left_iters = self . max_iter * self . max_epoch - ( self . progress_in_iter + 1 ) eta_seconds = self . meter [ "iter_time" ] . global_avg * left_iters eta_str = "ETA: {}" . format ( datetime . timedelta ( seconds = int ( eta_seconds ) ) ) progress_str = "epoch: {}/{}, iter: {}/{}" . format ( self . epoch + 1 , self . max_epoch , self . iter + 1 , self . max_iter ) loss_meter = self . meter . get_filtered_meter ( "loss" ) loss_str_list = [ ] for k , v in loss_meter . items ( ) : single_loss_str = "{}: {:.1f}" . format ( k , float ( v . latest ) ) loss_str_list . append ( single_loss_str ) loss_str = ", " . join ( loss_str_list ) time_meter = self . meter . get_filtered_meter ( "time" ) time_str = ", " . join ( [ "{}: {:.3f}s" . format ( k , float ( v . avg ) ) for k , v in time_meter . items ( ) ] ) logger . info ( "{}, {}, {}, lr: {:.3e}" . format ( progress_str , time_str , loss_str , self . meter [ "lr" ] . latest , ) + ( ", size: {:d}, {}" . format ( self . input_size [ 0 ] , eta_str ) ) ) self . meter . clear_meters ( ) if self . exp . random_size is not None and ( self . progress_in_iter + 1 ) % 10 == 0 : self . input_size = self . exp . random_resize ( self . train_loader , self . epoch , self . rank , self . is_distributed )
`after_iter` contains two parts of logic:
 log information
 reset setting of resize
` after_iter ` contains two parts of logic : log information reset setting of resize
"""
        `after_iter` contains two parts of logic:
            * log information
            * reset setting of resize
        """ # log needed information # random resizing
self