forked from misads/AliProducts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp.py
50 lines (33 loc) · 1.22 KB
/
help.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
from network import models
import misc_utils as utils
import os
def get_dirs(dir):
res = []
for file in os.listdir(dir):
if os.path.isdir(os.path.join(dir, file)):
res.append(file)
return '|'.join(res)
model_choices = '|'.join(models.keys())
log_choices = get_dirs('logs')
checkpoints_choices = get_dirs('checkpoints')
help = """Usage:
Training:
python train.py --tag your_tag --model {%s} -b 24 --gpu 0""" % model_choices + """
Finding Best Hyper Params:
python runx.py --run
Debug:
python train.py --model {%s} --debug""" % model_choices + """
Resume Training:
python train.py --tag your_tag --model ResNeSt101 --epochs 20 -b 24 --load checkpoints/{%s}/9_Model.pt """ % checkpoints_choices + """--resume
Eval:
python eval.py --tag your_tag2 --model ResNeSt101 -b 48 --load checkpoints/{%s}/9_Model.pt """ % checkpoints_choices + """
Generate Submission:
python submit.py --model ResNeSt101 --load checkpoints/my_ckpt.pt -b 48 --gpu 0
See Running Log:
cat logs/{%s}/log.txt""" % log_choices + """
Clear(delete all files with the tag, BE CAREFUL to use):
python clear.py --tag {%s} """ % log_choices + """
See ALL Running Commands:
cat run_log.txt
"""
print(help)