def test(self, dataset: BaseADDataset, device: str = 'cuda', n_jobs_dataloader: int = 0):
        """Tests the Semi-Supervised Deep Generative model on the test data."""

        if self.trainer is None:
            self.trainer = SemiDeepGenerativeTrainer(alpha=self.alpha, device=device,
                                                     n_jobs_dataloader=n_jobs_dataloader)

        self.trainer.test(dataset, self.net)
        # Get results
        self.results['test_auc'] = self.trainer.test_auc
        self.results['test_time'] = self.trainer.test_time
        self.results['test_scores'] = self.trainer.test_scores
Tests the Semi-Supervised Deep Generative model on the test data.
adbench/baseline/DeepSAD/src/baselines/SemiDGM.py