-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathargs.py
More file actions
69 lines (52 loc) · 2.44 KB
/
args.py
File metadata and controls
69 lines (52 loc) · 2.44 KB
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
import torch
import albumentations as tfms
class Args:
##############################
###### Hyperparameters #######
##############################
epochs = 100 # DEFAULT 100 (int >1)
batch_size = 4 # DEFAULT 4 (int >1)
weight_decay = 1e-5 # DEFAULT 1e-5 (float >=0)
arch = "inceptionv4" # DEFAULT inceptionv4 (resnet50 | resnet152 | senet154 | inceptionv4 | ...)
checkpoint = "auto" # DEFUALT auto (bool | auto)
pool_type = "avg" # DEFAULT avg (avg | max)
norm_type = "batchnorm" # DEFAULT batchnorm (batchnorm | instancenorm | groupnorm | layernorm)
initial_lr = 5e-5 # DEFAULT 5e-5 (float >0)
lr_schedule = "poly" # DEFAULT poly (None | poly | exp | step | multistep | cosine)
lr_schedule_params = { # DEFAULT {} (dict)
}
loss = "bce" # DEFAULT bce (bce | focal | fbeta | softmargin)
loss_params = {
}
device_ids = [0] # DEFAULT [0,] (list int 0-8)
workers = 4 # DEFAULT 4 (int >=0)
pretraining = False # DEFAULT False (bool)
pretrained = False # DEFAULT False (bool)
pretrain_info = None # DEFAULT None (None | tuple(str, str | int))
log_freq = 5 # DEFAULT 5 (int >0)
save_freq = 10 # DEFAULT best (best | None | int>0)
n_val_samples = None # DEFAULT None (int >0 | None)
n_train_eval_samples = 64 # DEFAULT 64 (int >0 | None)
debug = False # DEFAULT False (bool)
logging_enabled = True # DEFAULT True (bool)
train_split = "train" # DEFAULT train (train | val | trainval)
val_split = "val" # DEFAULT val (train | val | trainval)
img_size = 1024 # DEFAULT 1024 (None | int 224-4096)
include_laser = True # DEFAULT True (bool)
example_weighting = False # DEFAULT False (bool)
train_augmentation = tfms.Compose([
tfms.GaussNoise(var_limit=(2, 8)),
tfms.HorizontalFlip(p=0.5),
tfms.ShiftScaleRotate(shift_limit=0.1, scale_limit=0.1, rotate_limit=15),
])
##############################
########### Test #############
##############################
test_augmentation = [
tfms.HorizontalFlip(always_apply=True),
]
##############################
########## Paths #############
##############################
datapath = "./data/"
kaggle_datapath = "/home/felix/data/kaggle/"