-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_train_and_testing.py
96 lines (70 loc) · 2.72 KB
/
run_train_and_testing.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import ast
import sys
from ivu.trainer import Trainer
# TRAIN_PTH = r"datasets/train_key_points.pickle"
# TEST_PTH = r"datasets/test_key_points.pickle"
def temporal_kar_with_normalized_distance_matrix(conf_pth):
temporal_kar_trainer_with_normalized_distance_matrix = (
Trainer.train_with_normalized_distance_matrix(
train_pth=TRAIN_PTH,
test_pth=TEST_PTH,
conf_pth=conf_pth,
)
)
temporal_kar_trainer_with_normalized_distance_matrix.start_training()
def temporal_kar_with_distance_matrix(conf_pth):
temporal_kar_trainer_with_distance_matrix = Trainer.train_with_distance_matrix(
train_pth=TRAIN_PTH,
test_pth=TEST_PTH,
conf_pth=conf_pth,
)
temporal_kar_trainer_with_distance_matrix.start_training()
def temporal_with_normalized_key_points(conf_pth):
temporal_kar_trainer_with_normalized_key_points = (
Trainer.train_with_normalized_key_points(
train_pth=TRAIN_PTH,
test_pth=TEST_PTH,
conf_pth=conf_pth,
)
)
temporal_kar_trainer_with_normalized_key_points.start_training()
def lstm_with_normalized_key_points(conf_pth):
lstm_kar_trainer_with_normalized_key_points = (
Trainer.train_with_normalized_key_points(
train_pth=TRAIN_PTH,
test_pth=TEST_PTH,
conf_pth=conf_pth,
)
)
lstm_kar_trainer_with_normalized_key_points.start_training()
def lstm_with_normalized_distance_matrix(conf_pth):
lstm_kar_trainer_with_normalized_distance_matrix = (
Trainer.train_with_normalized_distance_matrix(
train_pth=TRAIN_PTH,
test_pth=TEST_PTH,
conf_pth=conf_pth,
)
)
lstm_kar_trainer_with_normalized_distance_matrix.start_training()
def lstm_with_distance_matrix(conf_pth):
lstm_kar_trainer_with_distance_matrix = Trainer.train_with_distance_matrix(
train_pth=TRAIN_PTH,
test_pth=TEST_PTH,
conf_pth=conf_pth,
)
lstm_kar_trainer_with_distance_matrix.start_training()
def _run_experiments():
temporal_kar_with_normalized_distance_matrix(
r"config/temporal_with_distance_matrix.yaml"
)
temporal_kar_with_distance_matrix(r"config/temporal_with_distance_matrix.yaml")
temporal_with_normalized_key_points(
r"config/temporal_with_normalized_key_points.yaml"
)
lstm_with_normalized_key_points(r"config/lstm_kar_normalized_key_points.yaml")
lstm_with_normalized_distance_matrix(r"config/lstm_kar_distance_matrix.yaml")
lstm_with_distance_matrix(r"config/lstm_kar_distance_matrix.yaml")
if __name__ == "__main__":
TRAIN_PTH = sys.argv[1]
TEST_PTH = ast.literal_eval(sys.argv[2])
_run_experiments()