(self)
Full training logic
Full training logic
Full training logic
def train(self):
        """
        Full training logic
        """
        for epoch in range(self.start_epoch + 1, self.epochs + 1):
            if self.config['distributed']:
                self.train_loader.sampler.set_epoch(epoch)
            self.epoch_result = self._train_epoch(epoch)
            if self.config['lr_scheduler']['type'] != 'WarmupPolyLR':
                self.scheduler.step()
            self._on_epoch_finish()
        if self.config['local_rank'] == 0 and self.tensorboard_enable:
            self.writer.close()
        self._on_train_finish()
def train ( self ) : for epoch in range ( self . start_epoch + 1 , self . epochs + 1 ) : if self . config [ 'distributed' ] : self . train_loader . sampler . set_epoch ( epoch ) self . epoch_result = self . _train_epoch ( epoch ) if self . config [ 'lr_scheduler' ] [ 'type' ] != 'WarmupPolyLR' : self . scheduler . step ( ) self . _on_epoch_finish ( ) if self . config [ 'local_rank' ] == 0 and self . tensorboard_enable : self . writer . close ( ) self . _on_train_finish ( )