-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_args.py
77 lines (75 loc) · 1.87 KB
/
get_args.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
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
import argparse
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
"--seed",
type=int,
default=1
)
parser.add_argument(
"--dataset_name",
type=str,
default="JHT",
help="support JHT",
)
parser.add_argument(
"--category_number",
type=int,
default=13,
help="the categories of the input data."
)
parser.add_argument(
"--pretrained_arch",
type=str,
default="resnet18",
help="text pretrained model."
)
parser.add_argument(
"--model_save_path",
type=str,
default="checkpoints",
help="path to save model."
)
parser.add_argument(
"--log_save_path",
type=str,
default="logs",
help="path to save log"
)
parser.add_argument(
"--res_save_path",
type=str,
default="results",
help="path to save model's performance.",
)
parser.add_argument(
"--num_workers",
type=int,
default=16,
help="num workers of loading data"
)
parser.add_argument(
'--prefetch',
default=128,
type=int,
help="use for training duration per worker"
)
parser.add_argument(
"--work_dir",
type=str,
default="/home/data/zhuchuanbo/Documents/competition/JHT",
help="path of working directory",
)
parser.add_argument(
"--pretrained_path",
type=str,
default="pretrained_models",
)
parser.add_argument(
"--test_pretrained_path",
type=str,
# default="/home/data/zhuchuanbo/Documents/competition/JHT/checkpoints/JHT/JHTModel_2022-10-18_10_25/best_model_0.pth",
default=None,
help="default mode for train or test",
)
return parser.parse_args()