(self, opt)
| 99 | |
| 100 | class BaseAnalysis(BaseModel): |
| 101 | def __init__(self, opt): |
| 102 | self.opt = opt |
| 103 | self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') |
| 104 | self.setup_environment() |
| 105 | self._load_model() |
| 106 | self.hook_list = self._register_hooks() |
| 107 | self.test_loaders = self.build_test_loaders() |
| 108 | |
| 109 | def setup_environment(self): |
| 110 | torch.backends.cudnn.benchmark = True |
nothing calls this directly
no test coverage detected