-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrun_gen_cov.py
51 lines (49 loc) · 1.63 KB
/
run_gen_cov.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import os
if __name__ == "__main__":
datasets = {
"dsprites": {
"decoder_models": {
'btcvae': None,
'factor_VAE': None,
'VAE': None,
'betaH_VAE': None,
'betaB_VAE': None,
'InfoGAN-CR': None,
},
},
"celeba": {
"decoder_models": {
'btcvae': None,
'factor_VAE': None,
'VAE': None,
'betaH_VAE': None,
'betaB_VAE': None,
'InfoGAN-CR': None,
'BEGAN': None,
'WGAN': None,
},
},
"celebahq": {
"decoder_models": {
'PGAN': None,
'StyleGAN': None,
},
},
}
suffixes = ['l100', '2', '3', '4', '5']
sups = ['sup', 'unsup']
for dataset_name, details in datasets.items():
print(details)
for decoder_model, decoder_checkpoint in details["decoder_models"].items():
for suffix in suffixes:
print(decoder_model, suffix)
if decoder_model == 'InfoGAN-CR' and suffix == 'l100':
suffix = None
for sup in sups:
to_run = f"python gen_cov.py --dataset {dataset_name} --decoder_model {decoder_model} --search_n_clusters --save_scores --plot --scores_file {dataset_name}_{sup}_var2 "
if suffix is not None:
to_run += f" --suffix {suffix} "
if sup == 'sup':
print('supervised')
to_run += f' --sup '
os.system(to_run)