trainer.py
def validate(self):
        """Runs inference on test set to get the final performance metrics"""
        # Load the best performing model first
        best_state = utils.load_best_model_state_dict(self.model_save_dir)

        self.model.load_state_dict(
            best_state['model']
        )

        # Run validation on test set
        test_top1_acc, test_top5_acc, _ = self._valid_epoch(
            epoch=-1,
            phase='test',
        )
        self.logger.info(
            'test_top1_acc {:.5f}, test_top5_acc {:.5f}'.format(
                test_top1_acc,
                test_top5_acc
            )
        )
Runs inference on test set to get the final performance metrics
Runs inference on test set to get the final performance metrics
Runs inference on test set to get the final performance metrics
def validate(self):
        best_state = utils.load_best_model_state_dict(self.model_save_dir)
        self.model.load_state_dict(
            best_state['model']
        )
        test_top1_acc, test_top5_acc, _ = self._valid_epoch(
            epoch=-1,
            phase='test',
        )
        self.logger.info(
            'test_top1_acc {:.5f}, test_top5_acc {:.5f}'.format(
                test_top1_acc,
                test_top5_acc
            )
        )
def validate ( self ) : best_state = utils . load_best_model_state_dict ( self . model_save_dir ) self . model . load_state_dict ( best_state [ 'model' ] ) test_top1_acc , test_top5_acc , _ = self . _valid_epoch ( epoch = - 1 , phase = 'test' , ) self . logger . info ( 'test_top1_acc {:.5f}, test_top5_acc {:.5f}' . format ( test_top1_acc , test_top5_acc ) )
Runs inference on test set to get the final performance metrics
Runs inference on test set to get the final performance metrics
"""Runs inference on test set to get the final performance metrics""" # Load the best performing model first # Run validation on test set
self