-
Notifications
You must be signed in to change notification settings - Fork 2
/
train_scripts_bedroom.py
41 lines (35 loc) · 1.09 KB
/
train_scripts_bedroom.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
import os
import click
@click.command()
@click.option('--reg_target_fake', default='gfeat', help='The regularization when discriminating fake images',
type=click.Choice(['gfeat', 'gfwimage']))
def main(reg_target_fake):
if reg_target_fake == 'gfeat':
reg_loss_fake = 'cos'
reg_weight_fake = 10
elif reg_target_fake == 'gfwimage':
reg_loss_fake = 'lpips'
reg_weight_fake = 3
cmd = f'python train.py \
--data=/nas1/datasets/LSUN/data_zip/lsun_bedroom_train_crop256.zip \
--outdir=exp \
--gpus=8 \
--cfg=paper256 \
--aug=noaug \
--metrics=fid50k \
--kimg=50000 \
--reg_type=glead \
--decoder_conv_kernel_size=1 \
--glead_res_g=32 \
--glead_res_d=64 \
--reg_target_real=gfwimage \
--reg_loss_real=lpips \
--reg_weight_real=10 \
--reg_target_fake={reg_target_fake} \
--reg_loss_fake={reg_loss_fake} \
--reg_weight_fake={reg_weight_fake} \
'
print(cmd)
os.system(cmd)
if __name__ == '__main__':
main()