-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
38 lines (31 loc) · 1.01 KB
/
config.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
import os
# Training Hyperparameters
NUM_CLASSES = 200
BATCH_SIZE = 512
VAL_EVERY_N_EPOCH = 1
NUM_EPOCHS = 20
OPTIMIZER_PARAMS = {'type': 'SGD', 'lr': 0.005, 'momentum': 0.9}
SCHEDULER_PARAMS = {'type': 'MultiStepLR', 'milestones': [30, 35], 'gamma': 0.2}
# Dataaset
DATASET_ROOT_PATH = 'datasets/'
NUM_WORKERS = 8
# Augmentation
IMAGE_ROTATION = 20
IMAGE_FLIP_PROB = 0.5
IMAGE_NUM_CROPS = 64
IMAGE_PAD_CROPS = 4
IMAGE_MEAN = [0.4802, 0.4481, 0.3975]
IMAGE_STD = [0.2302, 0.2265, 0.2262]
# Network
MODEL_NAME = 'resnet18'
# Compute related
ACCELERATOR = 'gpu'
DEVICES = [0]
PRECISION_STR = '32-true'
# Logging
WANDB_PROJECT = 'aue8088-pa1'
WANDB_ENTITY = os.environ.get('WANDB_ENTITY')
WANDB_SAVE_DIR = 'wandb/'
WANDB_IMG_LOG_FREQ = 50
WANDB_NAME = f'{MODEL_NAME}-B{BATCH_SIZE}-{OPTIMIZER_PARAMS["type"]}'
WANDB_NAME += f'-{SCHEDULER_PARAMS["type"]}{OPTIMIZER_PARAMS["lr"]:.1E}'