This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 240
/
Copy pathcifar_optim.yaml
76 lines (76 loc) · 1.86 KB
/
cifar_optim.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
DESC:
Example CIFAR sweep 1 of 3 (find lr and wd for cifar_regnet and cifar_best sweeps).
Tunes the learning rate (lr) and weight decay (wd) for ResNet-56 at 50 epochs.
The purpose of this sweep is to show how to optimize OPTIM parameters.
NAME: cifar/cifar_optim
SETUP:
# Number of configs to sample
NUM_CONFIGS: 64
# SAMPLERS for optimization parameters
SAMPLERS:
OPTIM.BASE_LR:
TYPE: float_sampler
RAND_TYPE: log_uniform
RANGE: [0.25, 5.0]
QUANTIZE: 1.0e-10
OPTIM.WEIGHT_DECAY:
TYPE: float_sampler
RAND_TYPE: log_uniform
RANGE: [5.0e-5, 1.0e-3]
QUANTIZE: 1.0e-10
# BASE_CFG is R-56 with large batch size and stronger augmentation
BASE_CFG:
MODEL:
TYPE: anynet
NUM_CLASSES: 10
ANYNET:
STEM_TYPE: res_stem_cifar
STEM_W: 16
BLOCK_TYPE: res_basic_block
DEPTHS: [9, 9, 9]
WIDTHS: [16, 32, 64]
STRIDES: [1, 2, 2]
OPTIM:
BASE_LR: 1.0
LR_POLICY: cos
MAX_EPOCH: 50
MOMENTUM: 0.9
NESTEROV: True
WARMUP_EPOCHS: 5
WEIGHT_DECAY: 0.0005
EMA_ALPHA: 0.00025
EMA_UPDATE_PERIOD: 32
BN:
USE_CUSTOM_WEIGHT_DECAY: True
TRAIN:
DATASET: cifar10
SPLIT: train
BATCH_SIZE: 1024
IM_SIZE: 32
MIXED_PRECISION: True
LABEL_SMOOTHING: 0.1
MIXUP_ALPHA: 0.5
TEST:
DATASET: cifar10
SPLIT: test
BATCH_SIZE: 1000
IM_SIZE: 32
NUM_GPUS: 1
DATA_LOADER:
NUM_WORKERS: 4
LOG_PERIOD: 25
VERBOSE: False
# Launch config options
LAUNCH:
PARTITION: devlab
NUM_GPUS: 1
PARALLEL_JOBS: 32
TIME_LIMIT: 60
# Analyze config options
ANALYZE:
PLOT_CURVES_BEST: 3
PLOT_METRIC_VALUES: True
PLOT_COMPLEXITY_VALUES: True
METRICS: [lr, wd, lr_wd]
COMPLEXITY: [flops, params, acts, memory, epoch_fw_bw, epoch_time]
PRE_FILTERS: {done: [1, 1, 1]}