-
Notifications
You must be signed in to change notification settings - Fork 2
/
transDA.yaml
91 lines (80 loc) · 1.7 KB
/
transDA.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# 0. project setting & shortcut
project_name: "hankyul2/DomainAdaptation"
short_id: ''
shortcut:
gpus: '0,'
max_epochs: 15
model_name: 'timm'
dropout: 0.1
dataset_name: 'amazon_webcam'
size:
- 256
- 256
- 224
- 224
batch_size: 32
num_workers: 4
lr: 0.01
# 1. load data
data:
class_path: src.data.office31.SourceFreeDomainAdaptation
init_args:
dataset_name: "amazon_webcam"
batch_size: 64
num_workers: 4
size:
- 256
- 256
- 224
- 224
data_root: data
valid_ratio: 0.1
return_idx: true
# 2. define model (define other backbone)
model:
class_path: src.system.trans_da.TransDA
init_args:
backbone_init:
model_name: "r50_vit_base_patch16_224"
pretrained: true
source_only_path: 'pretrained/DABase_VisionTransformer'
# 3. prepare train tools (optimizer, learning rate scheduler)
optimizer:
class_path: torch.optim.SGD
init_args:
lr: 0.01
momentum: 0.9
weight_decay: 0.001
nesterov: true
lr_scheduler:
class_path: src.lr_schedulers.PowerLR
init_args:
max_epochs: 0
num_step: 0
warmup_epoch: 0
# 4. train
seed_everything: null
trainer:
# 4-1. gpu devices
gpus: null
accelerator: null
amp_backend: native
# 4-2. train setting
max_epochs: 100
val_check_interval: 1.0
check_val_every_n_epoch: 1
# 4-3. logger & callbacks
log_every_n_steps: 50
# 4-4. hyper param tuning
auto_lr_find: false
auto_scale_batch_size: false
# 4-5. for debugging
fast_dev_run: false
limit_train_batches: 1.0
limit_val_batches: 1.0
limit_test_batches: 1.0
limit_predict_batches: 0.05
# 4-6. etc
profiler: null
precision: 32
multiple_trainloader_mode: max_size_cycle