forked from WenmuZhou/PSENet.pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
executable file
·53 lines (44 loc) · 1.01 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
# -*- coding: utf-8 -*-
# @Time : 2019/1/3 17:40
# @Author : zhoujun
# data config
trainroot = '/data2/dataset/ICD15/train'
testroot = '/data2/dataset/ICD15/test'
output_dir = 'output/psenet_icd2015_resnet152_4gpu_author_crop_adam_MultiStepLR_authorloss'
data_shape = 640
# train config
gpu_id = '2'
workers = 12
start_epoch = 0
epochs = 600
train_batch_size = 4
lr = 1e-4
end_lr = 1e-7
lr_gamma = 0.1
lr_decay_step = [200,400]
weight_decay = 5e-4
warm_up_epoch = 6
warm_up_lr = lr * lr_gamma
display_input_images = False
display_output_images = False
display_interval = 10
show_images_interval = 50
pretrained = True
restart_training = True
checkpoint = ''
# net config
backbone = 'resnet152'
Lambda = 0.7
n = 6
m = 0.5
OHEM_ratio = 3
scale = 1
# random seed
seed = 2
def print():
from pprint import pformat
tem_d = {}
for k, v in globals().items():
if not k.startswith('_') and not callable(v):
tem_d[k] = v
return pformat(tem_d)