-
Notifications
You must be signed in to change notification settings - Fork 4
/
63_grad_clip_norm_0.5.yml
executable file
·98 lines (82 loc) · 1.84 KB
/
63_grad_clip_norm_0.5.yml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# general settings
# name: debug
name: 63_grad_clip_norm_0.5
model_type: BCEModel
manual_seed: 0
cudnn_deterministic: true
# common settings
common:
bert: &bert hfl/chinese-roberta-wwm-ext
vit: &vit microsoft/swin-large-patch4-window12-384-in22k
# dataset and data loader settings
datasets:
train:
name: train_ClusterDataset
type: PairDataset
image_dir: /cache_ccks/item_images
pair_path: /cache_ccks/pair_train.jsonl
info_path: /cache_ccks/item_train_info.jsonl
tokenizer: *bert
max_len: 140
# data loader
batch_size_per_gpu: 4
num_worker_per_gpu: 4
pin_memory: true
val:
name: val_PairDataset
type: PairDataset
image_dir: /cache_ccks/item_images
pair_path: /cache_ccks/pair_val.jsonl
info_path: /cache_ccks/item_train_info.jsonl
tokenizer: *bert
max_len: 140
# data loader
batch_size_per_gpu: 64
num_worker_per_gpu: 4
pin_memory: true
test:
name: test_PairDataset
type: PairDataset
image_dir: /cache_ccks/item_images
pair_path: /cache_ccks/item_test_pair.jsonl
info_path: /cache_ccks/item_test_info.jsonl
tokenizer: *bert
max_len: 140
# data loader
batch_size_per_gpu: 64
num_worker_per_gpu: 4
pin_memory: true
# network structures
network:
type: VLArch
bert: *bert
vit: *vit
# path
path:
pretrain_network: ~
strict_load: true
# training settings
train:
optim:
type: Adam
lr: !!float 2e-6
weight_decay: !!float 1e-6
betas: [0.9, 0.999]
scheduler:
type: CosineAnnealingRestartLR
periods: [100000]
restart_weights: [1]
eta_min: !!float 1e-7
total_iter: 100000
warmup_iter: -1 # -1: no warm up
grad_clip_norm: 0.5
val:
iters: [64000]
test:
iters: [64000]
# logging settings
logger:
print_freq: 100
save_checkpoint_freq: 2000
wandb: ~
find_unused_parameters: false