-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.py
43 lines (42 loc) · 1.32 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
# coding=utf-8
# 训练文件夹
# sample_dir = "/Users/liupeng/Desktop/anaconda/data_padding/img_body_pose_train_crop_up" # 可以为txt, 但是需要该代码
sample_dir = "gender"
tfRecord = False
# 需要分类的类别数量
num_classes = 5
# 最小批训练的大小
batch_size = 1
# 选择使用的模型
# arch_model="arch_dcgan_conditional"
arch_model = "arch_dcgan_unconditional"
# 选择训练的网络层
checkpoint_exclude_scopes = "Logits_out"
# dropout的大小
dropout_prob = 0.8
# 选择训练样本的比例
train_rate = 0.9
# 整个训练集上进行多少次迭代
epoch = 2000
# 是否使用提前终止训练
early_stop = True
EARLY_STOP_PATIENCE = 1000
# 是否使用learning_rate
'''
'unconditional': (1e-4, 1e-3),
'conditional': (1e-4, 1e-3),
'''
learning_r_decay = True
learning_rate_base = 0.001
decay_rate = 0.95
height, width = 32,32 #224, 224
# 模型保存的路径
train_dir = 'model'
# 是否进行fine-tune。 选择fine-tune的的参数
fine_tune = False
# 是否训练所有层的参数
train_all_layers = True
# 迁移学习模型参数, 下载训练好模型:https://github.com/MachineLP/models/tree/master/research/slim
# checkpoint_path="pretrain/inception_v4/inception_v4.ckpt";
# checkpoint_path="pretrain/resnet_v2_50/resnet_v2_50.ckpt"
checkpoint_path = 'pretrain/inception_v4/inception_v4.ckpt'