-
Notifications
You must be signed in to change notification settings - Fork 1
/
fast_ibp_tinyimagenet.yaml
98 lines (80 loc) · 2.03 KB
/
fast_ibp_tinyimagenet.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
92
93
94
95
96
97
98
# @package _global_
# to execute this experiment run:
# python train.py experiment=example
defaults:
- override /datamodule: tinyimagenet.yaml
- override /model: fast_ibp_tinyimagenet.yaml
- override /callbacks: default.yaml
- override /trainer: default.yaml
seed: 100
trainer:
devices: 1
accelerator: gpu
strategy: null
auto_select_gpus: true
min_epochs: 160
max_epochs: 200
gradient_clip_val: 10.0
gradient_clip_algorithm: norm
track_grad_norm: 2.0
check_val_every_n_epoch: 1
datamodule:
batch_size: 256
num_workers: 8
model:
kappa: 0.0
init_method: ibp
schedule_start: 1
schedule_length: 80
weight_decay_l1: 1.e-4
min_eps_for_regularizers: 1.e-6
reg_tight_weight: 0.2
reg_relu_weight: 0.2
optimizer:
name: Adam
amsgrad: false
lr: 5.e-4
weight_decay: 0.0
lr_scheduler:
# name: OneCycleLR
# max_lr: 1.e-3
# total_steps: 160000
# pct_start: 0.3
# anneal_strategy: linear # cos
# div_factor: 15.0 # init_lr = max_lr / div_factor
# final_div_factor: 1000. # min_lr = max_lr / final_div_factor
# three_phase: False
# interval: step # step
name: MultiStepLR
milestones: [120, 140]
gamma: 0.2
interval: epoch # step
eps_test: [0.00392156863] # 1/255
# epsilon finding
max_eps: 0.00392156863 # ~1/255
xtol: 1.e-8
rtol: 1.e-5
maxiter: 100
ftol: 1.e-8
# loss function
standard_loss: CrossEntropy
standard_label_smoothing: 0.0
robust_loss: CrossEntropy
robust_label_smoothing: 0.0
callbacks:
model_checkpoint:
monitor: "val/acceps"
dirpath: ${paths.output_dir}/../../checkpoints/kappa=${model.kappa}
# filename: "epoch={epoch:04d}-step={step}-val_acceps={val/acceps:.4f}"
filename: "best_acceps"
mode: "max"
save_last: True
auto_insert_metric_name: False
verbose: True
save_top_k: 1
early_stopping:
monitor: "val/acceps"
patience: 70
mode: "max"
tags: ["tinyimagenet", "cnn7", "fastibp", ]
task_name: "train/fast_ibp_tinyimagenet"