MCPcopy Create free account
hub / github.com/CSAILVision/gandissect / __init__

Method __init__

netdissect/serverstate.py:19–31  ·  view source on GitHub ↗
(self, config, project_dir, path_url, public_host)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 2

GanTesterClass · 0.85
joinMethod · 0.80

Tested by

no test coverage detected