-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
55 lines (43 loc) · 1.39 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import os
#traing config
batch_size = 8
image_num = 1000
rounds_init = image_num // batch_size
rounds = image_num // batch_size
epoch_num_init = 50
epoch_num = 2000
#input config
dim = 3
ratio = 4
image_width = 24
image_height = 24
origin_width = image_width * ratio
origin_height = image_height * ratio
#data config
data_train_HR = os.path.join('readonly', 'dataset', 'trainHR')
data_train_LR = os.path.join('readonly', 'dataset', 'trainLR')
data_valid_HR = os.path.join('readonly', 'dataset', 'testHR')
data_valid_LR = os.path.join('readonly', 'dataset', 'testLR')
# network config
G_input_shape = [batch_size, image_width, image_height, dim]
G_output_shape = [batch_size, origin_width, origin_height, dim]
resblock_num = 16
subpixel_num = 2
#optimizer config
lr_init = 1e-4
beta1 = 0.9
#checkpoint
checkpoint_dir = os.path.join('longterm', 'checkpoint')
model_name = 'srgan-model'
#restore mode
global_step = 0
#config
test_input = os.path.join('temp', 'predict', 'input.json')
test_output = os.path.join('temp', 'predict', 'output.json')
train_output = os.path.join('temp', 'train', 'output.json')
config_name = 'config.json'
sample_image = os.path.join('readonly', 'example', 'sample1.png')
test_image = [sample_image]
train_path = os.path.join('temp', 'train')
predict_path = os.path.join('temp', 'predict')
log_dir_train = os.path.join('log', 'train')