-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathconfig_hifacegan.py
More file actions
140 lines (123 loc) · 3.27 KB
/
config_hifacegan.py
File metadata and controls
140 lines (123 loc) · 3.27 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
import sys
class TrainOptions(object):
dataroot = '<your dataset folder, [LQ;HQ]>'
dataroot_assist = ''
name = '<your experiment name>'
crop_size = 512
gpu_ids = [0] # set to [] for CPU-only training (not tested)
gan_mode = 'ls'
continue_train = False
which_epoch = 'latest'
D_steps_per_G = 1
aspect_ratio = 1.0
batchSize = 2
beta1 = 0.0
beta2 = 0.9
cache_filelist_read = True
cache_filelist_write = True
checkpoints_dir = './checkpoints'
choose_pair = [0, 1]
coco_no_portraits = False
contain_dontcare_label = False
dataset_mode = 'train'
debug = False
display_freq = 100
display_winsize = 256
print_freq = 100
save_epoch_freq = 1
save_latest_freq = 5000
init_type = 'xavier'
init_variance = 0.02
isTrain = True
is_test = False
semantic_nc = 3
label_nc = 3
output_nc = 3
lambda_feat = 10.0
lambda_kld = 0.05
lambda_vgg = 10.0
load_from_opt_file = False
lr = 0.0002
max_dataset_size = sys.maxsize
model = 'pix2pix'
nThreads = 2
n_layers_D = 4
num_D = 2
ndf = 64
nef = 16
netD = 'multiscale'
netD_subarch = 'n_layer'
netG = 'hifacegan' # spade, lipspade
ngf = 64 # set to 48 for Titan X 12GB card
niter = 30
niter_decay = 20
no_TTUR = False
no_flip = False
no_ganFeat_loss = False
no_html = False
no_instance = True
no_pairing_check = False
no_vgg_loss = False
norm_D = 'spectralinstance'
norm_E = 'spectralinstance'
norm_G = 'spectralspadesyncbatch3x3'
num_upsampling_layers = 'normal'
optimizer = 'adam'
phase = 'train'
prd_resize = 512
preprocess_mode = 'resize_and_crop'
serial_batches = False
tf_log = False
train_phase = 3 # progressive training disabled (set initial phase to 0 to enable it)
# 20200211
#max_train_phase = 2 # default 3 (4x)
max_train_phase = 3
# training 1024*1024 is also possible, just turning this to 4 and add more layers in generator.
upsample_phase_epoch_fq = 5
use_vae = False
z_dim = 256
class TestOptions(object):
name = '<must be the same as TrainOptions.name>'
results_dir = './results/'
gpu_ids = [0]
crop_size = 512
dataset_mode = 'test'
which_epoch = 'latest'
aspect_ratio = 1.0
batchSize = 1
cache_filelist_read = True
cache_filelist_write = True
checkpoints_dir = './checkpoints'
coco_no_portraits = False
contain_dontcare_label = False
display_winsize = 256
how_many = sys.maxsize
#how_many = 10
init_type = 'xavier'
init_variance = 0.02
isTrain = False
is_test = True
label_nc = 3
output_nc = 3
semantic_nc = 3
load_from_opt_file = False
max_dataset_size = sys.maxsize
# make sure the following options match the TrainOptions
model = 'pix2pix'
nThreads = 0
netG = 'hifacegan'
nef = 16
ngf = 64
no_flip = True
no_instance = True
no_pairing_check = False
norm_D = 'spectralinstance'
norm_E = 'spectralinstance'
norm_G = 'spectralspadesyncbatch3x3'
num_upsampling_layers = 'normal'
phase = 'test'
prd_resize = 512
preprocess_mode = 'resize_and_crop'
serial_batches = True
use_vae = False
z_dim = 256