-
Notifications
You must be signed in to change notification settings - Fork 87
/
evaluate.py
executable file
·57 lines (28 loc) · 925 Bytes
/
evaluate.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
"""
@Fire
https://github.com/fire717
"""
import os,argparse
import random
from lib import init, Data, MoveNet, Task
from config import cfg
def main(cfg):
init(cfg)
model = MoveNet(num_classes=cfg["num_classes"],
width_mult=cfg["width_mult"],
mode='train')
data = Data(cfg)
data_loader = data.getEvalDataloader()
run_task = Task(cfg, model)
run_task.modelLoad("output/e100_valacc0.98349.pth")
run_task.evaluate(data_loader)
# model = MoveNet(num_classes=cfg["num_classes"],
# width_mult=cfg["width_mult"],
# mode='test')
# data = Data(cfg)
# data_loader = data.getEvalDataloader()
# run_task = Task(cfg, model)
# run_task.modelLoad("output/e92_valacc0.98326.pth")
# run_task.evaluateTest(data_loader)
if __name__ == '__main__':
main(cfg)