-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.yaml
80 lines (76 loc) · 4.18 KB
/
config.yaml
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
############################ Project Settings ############################
# :Params cnn: cnn layers use 'CNN5', 'ResNet50', 'DenseNet121', 'DenseNet169', 'DenseNet201';
# :Params rnn: rnn layer use 'BiLSTM' or 'BiGRU';
# :Params use_gpu: whether use gpu. If True, model will use CudnnGRU or CudnnLSTM to accelerate computing;
# :Params image_width: the images's width;
# :Params image_height: the images's height;
# :Params channel: the images's color channels.If channel=1, it means that program will convert the image to gray mode.
# :Params resize: tuple/list of 2 integers. Reshape the image size when make dataset;
# :Params replace_transparent: If True, Program will convert image mode 'RGBA' into 'RGB';
# :Params standardization: If True, the image standardization will be done and make binaryzation/smoo Invalid argument:
# sequence_length(0) <= 7th ops useless;
# :Params binaryzation: If -1, not use image binaryzation else choose a value between (0,255) to set binary threshold;
# :Params smooth: If -1, not use image smooth else choose a odd value greater than 1 to set MedianBlur's kernel size;
# :Params blur: If -1, not use image blur else choose a odd value greater than 1 to set GaussianBlur's kernel size;
# :Params dataset: the dataset's name, not Null;
# :Params train_path: train data path, which contains all train images. These images will be converted to tfrecords;
# :Params test_path: test data path, which contains all test images. These images will be converted to tfrecords;
# :Params val_path: val data path, which contains all val images. These images will be converted to tfrecords;
# :Params n_class: character numbers the corpus's labels contains;
# :Params max_seq_len: max character numbers the label sequence contains;
# :Params character: all characters the corpus's labels contains, must contain '' in the list;
# :Params epochs: train epochs;
# :Params batch_size: train batch size;
# :Params end_acc: if acc is higher than 'end_acc', the training process will stop;
# :Params end_cost: if train cost is smaller than 'end_cost', the training process will stop;
# :Params learning_rate: use it in Adam
# :Params decay: use it in Adam
# :Params regularizer_l2: use in cnn layers
# :Params rnn_units: the unit number of rnn layers, default '64';
# :Params ctc_greedy: perform much faster best-path search if `true`, default 'True';
# :Params beam_width: if `greedy` is `false`: a beam search decoder will be used with a beam of this width
# :Params top_paths: that contains the log probability of each decoded sequence.
# :Params time_major: If time_major == False, this will be a `Tensor` shaped: `[batch_size, max_time, num_classes]`,
# else `[batch_size,max_time, num_classes]`, default 'True';
# :Params ctc_merge_repeated: If `ctc_merge_repeated` is set False, then deep within the CTC calculation, repeated
# non-blank labels will not be merged and are interpreted as individual labels, default 'True';
# :Params preprocess_collapse_repeated: If `preprocess_collapse_repeated` is True, then a preprocessing step runs before
# loss calculation, wherein repeated labels passed to the loss are merged into single labels, default 'False';
# :Params decode_merge_repeated: If `merge_repeated` is `True`, merge repeated classes in output, default 'false'.
model:
cnn: ResNet50
rnn: BiLSTM
use_gpu: False
image_width: 150
image_height: 50
channel: 3
resize: [150, 50]
replace_transparent: True
standardization: False
binaryzation: -1
smooth: -1
blur: -1
dataset: tencent
train_path: cyclegan/datasets/tencent/trainA
test_path: cyclegan/datasets/tencent/testA
val_path: cyclegan/datasets/tencent/valA
n_class: 38
max_seq_len: 4
epochs: 100000
batch_size: 64
end_acc: 0.9
end_cost: 1.0
learning_rate: 0.0001
decay: 0.1
regularizer_l2: 0.01
rnn_units: 64
ctc_greedy: True
beam_width: 5
top_paths: 1
time_major: True
ctc_merge_repeated: True
preprocess_collapse_repeated: False
ctc_decode_merge_repeated: False
characters: ['a', 'c', 'b', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '']