def METHOD_NAME(self):
    print("\n\n**********************************\nTest ESR infer function \n*"
          "*********************************")
    self.learner.init_model(num_branches=9)
    self.learner.load(ensemble_size=9, path_to_saved_network=self.pretrained_path)
    val_data = datasets.AffectNetCategorical(idx_set=2,
                                             max_loaded_images_per_label=2,
                                             transforms=None,
                                             is_norm_by_mean_std=False,
                                             base_path_to_affectnet=self.dataset_path)
    val_loader = DataLoader(val_data, batch_size=32, shuffle=False, num_workers=8)
    batch = next(iter(val_loader))[0]
    # input is Tensor
    ensemble_emotion_results, ensemble_dimension_results = self.learner.infer(batch)
    self.assertIsNotNone(ensemble_emotion_results[0].confidence, msg="The predicted confidence score is None")
    self.assertNotEqual((sum(sum(ensemble_dimension_results))).numpy(), 0.0,
                        msg="overall ensembled dimension results are zero")