-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
40 lines (32 loc) · 1.5 KB
/
config.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
from easydict import EasyDict as edict
import json
config = edict()
config.TRAIN = edict()
## Adam
config.TRAIN.batch_size = 1
config.TRAIN.lr_init = 1e-4
config.TRAIN.beta1 = 0.9
## initialize G
config.TRAIN.n_epoch_init = 5 # 100
# config.TRAIN.lr_decay_init = 0.1
# config.TRAIN.decay_every_init = int(config.TRAIN.n_epoch_init / 2)
## adversarial learning (SRGAN)
config.TRAIN.n_epoch = 10
config.TRAIN.lr_decay = 0.1
config.TRAIN.decay_every = int(config.TRAIN.n_epoch / 2)
## train set location
# config.TRAIN.hr_img_path = '/media/hadi/HHD 6TB/Datasets/Bcop/Supper Resolution/Hq'
config.TRAIN.hr_img_path = '/home/minou/Moktari_Projects/Gan-Multimodal_Vedai_IR/Test2/Input_NIR/' # CelebA
# config.TRAIN.hr_img_path = '/home/minou/Moktari_Projects/Gan-Multimodal_Vedai_IR/JPEGImages_Vis/' # CelebA
# config.TRAIN.tr_img_path = '/home/minou/Moktari_Projects/Gan-Multimodal_Vedai_IR/JPEGImages/'
config.TRAIN.tr_img_path = '/home/minou/Moktari_Projects/Gan-Multimodal_Vedai_IR/JPEGImages_RGB_Test/'
#
# config.VALID = edict()
# ## test set location
# config.VALID.hr_img_path = '/home/minou/Projects/srgan-master_plain_VedaiVisible/Vedai_Test(512x512)'
# config.VALID.lr_img_path = '/home/minou/Projects/srgan-master_plain_VedaiVisible/Vedai_Test_LR(128x128)'
def log_config(filename, cfg):
with open(filename, 'w') as f:
f.write("================================================\n")
f.write(json.dumps(cfg, indent=4))
f.write("\n================================================\n")