-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop_training.py
More file actions
76 lines (47 loc) · 2.62 KB
/
loop_training.py
File metadata and controls
76 lines (47 loc) · 2.62 KB
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
import sys
import os
import numpy as np
import timeit
from itertools import product
start_time = timeit.default_timer()
obj_category = "cylinder_10kPa"
batch_size = 180 #128
#### Train manipulation point
# os.chdir("./learn_mp")
# # os.system(f"python3 process_seg_data.py --obj_category {obj_category}")
# os.system(f"python3 process_classifier_data2.py --obj_category {obj_category}")
# os.system(f"python3 dense_predictor_trainer.py --obj_category {obj_category} --batch_size {batch_size}")
# os.system(f"python3 single_box_classifier_trainer.py --obj_category {obj_category} --batch_size {batch_size}")
#### Train DeformerNet
os.chdir("./rotation")
os.system(f"python3 resample_point_cloud.py --obj_category {obj_category}")
os.system(f"python3 add_mani_pt.py --obj_category {obj_category}")
# # for option in [False, True]:
# for option in [True]:
# # os.system(f"python3 generalization_tasks/multi_hemis_trainer.py --use_mp_input {str(option)} \
# # --obj_category {obj_category} --batch_size {batch_size}") # w/o MP
# # os.system(f"python3 single_box_trainer.py --use_mp_input {str(option)} --obj_category {obj_category} --batch_size {batch_size}") # w MP
# os.system(f"python3 rotation_trainer_modified_ratio.py --use_mp_input {str(option)} --obj_category {obj_category} --batch_size {batch_size}")
# ### Train bimanual
# prim_names = ["hemis"] #["box", "cylinder", "hemis"]
# stiffnesses = ["10k"]
# os.chdir("./bimanual")
# for (prim_name, stiffness) in list(product(prim_names, stiffnesses)):
# obj_category = f"{prim_name}_{stiffness}Pa"
# # if stiffness == "5k":
# os.system(f"python3 process_data_bimanual.py --obj_category {obj_category}")
# os.system(f"python3 bimanual_trainer.py --obj_category {obj_category} --batch_size {batch_size}")
# # os.chdir("../")
# # for option in [False, True]:
# # # for option in [False]:
# # # os.system(f"python3 generalization_tasks/multi_hemis_trainer.py --use_mp_input {str(option)}")
# # os.system(f"python3 rotation/single_box_trainer.py --use_mp_input {str(option)}")
# ### Train bimanual occlusion
# prim_names = ["box"] #["box", "cylinder", "hemis"]
# stiffnesses = ["10k"]
# os.chdir("./bimanual")
# for (prim_name, stiffness) in list(product(prim_names, stiffnesses)):
# obj_category = f"{prim_name}_{stiffness}Pa"
# # os.system(f"python3 process_data_bimanual.py --obj_category {obj_category}")
# os.system(f"python3 bimanual_trainer_modified.py --obj_category {obj_category} --batch_size {batch_size}")
# print(f"DONE! You burned {(timeit.default_timer() - start_time)/3600} trees" )