-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
30 lines (26 loc) · 2.22 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
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--lr", type=float, default=1.0, help="learning rate for CNN model")
parser.add_argument("--clf_lr", type=float, default=0.01, help="learning rate for Linear Classifier")
parser.add_argument("--batch", type=int, default=128, help="batch size")
parser.add_argument("--epoch", type=int, default=200, help="epoch")
parser.add_argument("--clf_epoch", type=int, default=50, help="clf_epoch")
parser.add_argument("--classNum", type=int, default=10, help="class number")
parser.add_argument("--data_root", type=str, default=r"C:\\Users\\ALIENWARE\\Desktop\\Temp\\20220322_sloppy_discuss\\data", help="root dir of dataset")
parser.add_argument("--dir_ckpt", type=str, default="./ckpts/t05_500_sr", help="dir for saving checkpoints")
parser.add_argument("--dir_log", type=str, default="./log/t05_500_sr", help="dir for saving log file")
parser.add_argument("--workers", type=int, default=4, help="number of subprocess for loading data")
parser.add_argument("--temperature", type=float, default=0.5, help="Temperature scale for loss function")
parser.add_argument("--accumulate", type=int, default=1, help="calucalte gradient until accumulating N batch")
parser.add_argument("--strength", type=float, default=0.5, help="strength of augmentation")
parser.add_argument("--useLARS", type=bool, default=True, help="using LARS optimizer")
parser.add_argument("--weight_decay", type=float, default=1e-6, help="train optim weight decay")
parser.add_argument("--momentnum", type=float, default=0.9, help="train optim momentnum")
parser.add_argument("--warmup", type=int, default=0, help="warm up learning while training")
parser.add_argument("--pro_in", type=int, default=128, help="input size for projector")
parser.add_argument("--pro_hidden", type=int, default=128, help="hidden size for projector")
parser.add_argument("--pro_out", type=int, default=32, help="output size for projector")
parser.add_argument("--linear_in", type=int, default=128, help="input size for linear classifier")
parser.add_argument("--eval_routine", type=int, default=20, help="each epochs for linear evaluation")
parser.add_argument("--subset_interval", type=int, default=10, help="only takes every n samples")
args = parser.parse_args()