| 17 | types and the pytorch-specific tensors required by GanTester. |
| 18 | ''' |
| 19 | def __init__(self, config, project_dir, path_url, public_host): |
| 20 | print('config done', project_dir) |
| 21 | self.use_cuda = torch.cuda.is_available() |
| 22 | self.dissect = config |
| 23 | self.project_dir = project_dir |
| 24 | self.path_url = path_url |
| 25 | self.public_host = public_host |
| 26 | self.cachedir = os.path.join(self.project_dir, 'cache') |
| 27 | self.tester = GanTester( |
| 28 | config.settings, dissectdir=project_dir, |
| 29 | device=torch.device('cuda') if self.use_cuda |
| 30 | else torch.device('cpu')) |
| 31 | self.stdz = [] |
| 32 | |
| 33 | def get_zs(self, size): |
| 34 | if size <= len(self.stdz): |