-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathconsistent_teacher_r50_fpn_coco_180k_10p_2x8.py
62 lines (56 loc) · 1.51 KB
/
consistent_teacher_r50_fpn_coco_180k_10p_2x8.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
56
57
58
59
60
61
62
_base_ = './consistent_teacher_r50_fpn_coco_180k_10p.py'
fold = 1
percent = 10
data = dict(
samples_per_gpu=2,
workers_per_gpu=2,
train=dict(
sup=dict(
ann_file="data/coco_semi/semi_supervised/instances_train2017.${fold}@${percent}.json",
),
unsup=dict(
ann_file="data/coco_semi/semi_supervised/instances_train2017.${fold}@${percent}-unlabeled.json",
),
),
sampler=dict(
train=dict(
type="SemiBalanceSampler",
sample_ratio=[1, 1],
by_prob=False,
# at_least_one=True,
epoch_length=7330,
)
),
)
semi_wrapper = dict(
train_cfg=dict(
unsup_weight=1.0,
),
)
custom_hooks = [
dict(type="NumClassCheckHook"),
dict(type="WeightSummary"),
dict(type='SetIterInfoHook'),
dict(type="MeanTeacher", momentum=0.9998, interval=1, warm_up=0),
]
optimizer = dict(type="SGD", lr=0.005, momentum=0.9, weight_decay=0.0001)
log_config = dict(
interval=50,
hooks=[
dict(type="TextLoggerHook", by_epoch=False),
dict(
type="WandbLoggerHook",
init_kwargs=dict(
project="consistent-teacher",
name="${cfg_name}",
config=dict(
fold="${fold}",
percent="${percent}",
work_dirs="${work_dir}",
total_step="${runner.max_iters}",
),
),
by_epoch=False,
)
],
)